Zain and Zion are best friends. Their favourite game is finding palindromic numbers. But today Zion wanted to make the game more interesting. So he made some rules for the game. The rules are given below:
Now, Zain got stuck with these rules. Can you help Zain to play the game by writing a simple program?
First line will have T, the number of test cases. Next T lines will contain a string S which will be a valid number in words. (1 <= T <= 10000). The valid number will be less than ten thousand. All letters will be in lower case.
You have to print “YES” if the number’s binary form is a palindrome, otherwise print “NO” without quotation mark.
2 two two hundred fifty five
Note: In the sample, Binary of two is (10)2 . From the definition of Palindromic Number we know “A palindromic number is a number that remains the same when its digits are reversed”. And binary of 2(two) doesn’t meet the definition.