

The first line contains a single integer ‘T’ representing the number of test cases.
The first and only line of each test case contains a single integer ‘X’ denoting the given integer.
Return the single integer denoting the possible value. The output for each test case is printed in a separate line. "YES" will be printed if (X+Y) is palindrome otherwise "NO".
You do not need to print anything, it has already been taken care of. Just implement the given function.
The main idea is to first convert the given number into its binary representation. the bits from 1st to N/2 from left and right of the binary representation of the number where N is the number of bits in the binary representation of the number. If they are equal then move to the next bit. If they are not equal we need to make them equal. If ith bit from left is 1 then add 2^(N-i-1) to the answer since we need to set the N-i-1 bit of the answer. Else add 2^(i) to the answer since we need to set ith bit from left in the answer. In this way, it will form a number with binary representation a palindrome and the given answer will be minimum.