© 2020 CERN , for the CMS Collaboration. Published by the American Physical Society. The second- and third-order azimuthal anisotropy Fourier harmonics of charged particles produced in pPb collisions, at sNN=8.16TeV, are studied over a wide range of event multiplicities. Multiparticle correlations are used to isolate global properties stemming from the collision overlap geometry. The second-order "elliptic" harmonic moment is obtained with high precision through four-, six-, and eight-particle correlations and, for the first time, the third-order "triangular" harmonic moment is studied using four-particle correlations. A sample of peripheral PbPb collisions at sNN=5.02TeV that covers a similar range of event multiplicities as the pPb results is also analyzed. Model calculations of initial-state fluctuations in pPb and PbPb collisions can be directly compared to the high-precision experimental results. This work provides new insight into the fluctuation-driven origin of the v3 coefficients in pPb and PbPb collisions, and into the dominating overall collision geometry in PbPb collisions at the earliest stages of heavy ion interactions.