Accurate potential energy surfaces for the N-2-N-2 and N-2-O-2 dimers have been obtained from the analysis of scattering experiments from our laboratory, and of available second virial coefficient data. A harmonic expansion functional form describes the geometries of the dimers and accounts for the relative contributions to the intermolecular interaction from components of different nature. Together with the previously obtained singlet, triplet and quintet O-2-O-2 surfaces, where the role of spin-spin coupling was also considered, the new surfaces allow the full characterization of structure and internal dynamics of the clusters, whose bound states and eigenfunctions are obtained by exact quantum mechanics. Besides the information on the nature of the bond, these results can be of use in modelling the role of dimers in air. The calculated rotovibrational levels also provide a guidance for the analysis of spectra, thus establishing the ground for atmospheric monitorings.