Determination of potential energy functions of CO-CO, CO2-CO2, and N2O-N2O and calculation of their