Rotations

Humbertov Moralov in his student days, enrolled in the Systems Engineering program at “University of the Missing Hill” in The Heaven’s Branch Office (Colombia, South America). He then attended a course of Assembly Language (in the first half of 1997). The course was fantastic, with very interesting topics such as bit manipulation, right shifts, left shifts, rotations, masks and other bitwise operations (and, or, xor, not). And the best, in that course he worked interesting programming challenges. One of those programming challenges follows. The chosen programming challenge is named “Rotations”. By that time he used to work with unsigned integers of eight bits (a byte), and the challenge consisted of figuring out if a particular number n could generate all the eight numbers from 0 to 7 taking groups of consecutive bits of size 3. For example, the number 226 has the binary representation 11100010 (b7b6b5b4b3b2b1b0), the eight sequences of consecutive three-bits that can be generated are the following: • b2b1b0 = (010)2 = 2 • b3b2b1 = (001)2 = 1 • b4b3b2 = (000)2 = 0 • b5b4b3 = (100)2 = 4 • b6b5b4 = (110)2 = 6 • b7b6b5 = (111)2 = 7 • b0b7b6 = (011)2 = 3 • b1b0b7 = (101)2 = 5 20 years have passed. Since today computers are more powerful and faster, the professor Humbertov Moralov wants you to solve this programming challenge for unsigned integers of 32 bits (four bytes). You must validate if the number n generates all the 32 numbers from 0 to 31 with sequences of consecutive five-bits. Input Input begins with an integer t (1 ≤ t ≤ 3∗105), the number of test cases, followed by t lines, each line containing an integer n (0 ≤ n ≤ 4∗109). Output For each test case, you should print a single line containing the word ‘yes’ or ‘no’ depending if the integer number n produces or not all the numbers from 0 to 31 with sequences of consecutive five-bits.

2/2 Sample Input 15 65535 65259922 81354525 112805325 122525196 192052550 225525450 299525510 318353525 344152934 502445252 522595252 1296752550 3999995011 4000000000 Sample Output no no yes no no yes yes no yes no yes yes no yes no