Direct photon production in pp and pp interactions at √s = 24.3 GeV