Not sure where to start- this is more of a riddle our proff asked, but now i am bothered by it and want the answer.

I know two distinct secret numbers: call them X and Y , and assume that X < Y , without loss of generality. You have no clue how I came up with them. They could be anything (positive, negative, rational, irrational, etc). They could come from any probability distribution (discrete or continuous). You have no idea. I flip a fair coin. If the coin shows Heads, I reveal to you the larger number, Y ; if it shows Tails, I reveal to you the smaller number, X. You do not get to see the result of the coin flip. Your goal is to guess whether the coin was Heads or Tails, based only on your seeing the one number that I revealed to you. Obviously, if you just decide “Heads” is your guess, without taking into account the revealed number at all, then you are correct with probability 0.5. But your goal is to be able to be correct with probability strictly greater than 0.5. Devise a method to do this, and explain your solution.