Explain the relationship between frequency and the energy carried by an EM wave.