From Ancient Greek παν- (pan-, “suffix”). In word formation, with [n] > [m] before labial consonants.
παμ- • (pam-)