Which photon has more mass?

Which of the following has the greatest mass?
An infra-red photon
A UV photon
An optical photon
An x-ray photon

This question is on a past exam paper that I'm going through. I thought photons have no rest rest mass, so how can one have more mass than another? I have tried the textbook, the lecture notes and the internet but cant find anything of any use.