Differential \ee cross section as a function of \mee measured in \pp (left) and \pPb (right) collisions at \fivenn. The data are compared to the hadronic cocktail, where the heavy-flavor contributions are fitted to the \pp spectrum in the intermediate-mass region, and for \pPb collisions scaled with the atomic mass number of the Pb nucleus $A$ = 208. The gray band represents the total uncertainty on the hadronic cocktail.