Light amplification in CdTe and InSe under two-photon pumping