XOR Profit Problem

plz give me some hint to this prob, im not getting any idea to solve this problem , thank you

In this problem you will be given two inputs, lets say x and y. You have to find the maximum xor value of two numbers between x and y. For eg : user inputs x as 3 and y as 7. Then the numbers between 3 and 7, both included, are 3,4,5,6,7. You have to pair up all the numbers and find which pair has the max xor value. After finding the maximum xor value you have to print it.
Hope this helps.