Multiplicity and transverse momentum dependence of two- and four-particle correlations in pPb and PbPb collisions