The second-order azimuthal anisotropy Fourier harmonics, v2, are obtained in p-Pb and PbPb collisions over a wide pseudorapidity (η) range based on correlations among six or more charged particles. The p-Pb data, corresponding to an integrated luminosity of 35 nb-1, were collected during the 2013 LHC p-Pb run at a nucleon-nucleon center-of-mass energy of 5.02 TeV by the CMS experiment. A sample of semiperipheral PbPb collision data at √sNN=2.76 TeV, corresponding to an integrated luminosity of 2.5 μb-1 and covering a similar range of particle multiplicities as the p-Pb data, is also analyzed for comparison. The six- and eight-particle cumulant and the Lee-Yang zeros methods are used to extract the v2 coefficients, extending previous studies of two- and four-particle correlations. For both the p-Pb and PbPb systems, the v2 values obtained with correlations among more than four particles are consistent with previously published four-particle results. These data support the interpretation of a collective origin for the previously observed long-range (large Δη) correlations in both systems. The ratios of v2 values corresponding to correlations including different numbers of particles are compared to theoretical predictions that assume a hydrodynamic behavior of a p-Pb system dominated by fluctuations in the positions of participant nucleons. These results provide new insights into the multiparticle dynamics of collision systems with a very small overlapping region.