April Fools' Day Contest 2 P1 - Columbus' Conjecting Conundrum

View as PDF

Submit solution


Points: 0
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

Concurrent with Columbus' colonialism contract, Cambodia's consumerism consultant commissions Columbus with contemplating compelling conspiracies contingent with a certain celebrated Conjecture.

Given n candidate cardinals c_1\cdots c_n, Columbus is compulsed to conclude whether circular composition of C(c_i) where C(c)=\begin{cases}3c+1 & c\nmid 2 \\ \frac{c}{2} & c|2\end{cases} causes convergence to 1.

Can you capitalize on the compute capacity of Columbus' computer's CPU cores to complete this ceaseless chore?

Input Specification

The first line contains one integer n (1\le n\le 10^6). The second line contains n space separated integers c_i (1\le c_i\le 10^9).

Output Specification

Print n lines, YES if the circular composition of C(c_i) converges to 1, NO if it doesn't.

Sample Input

2
2 3

Sample Output

YES
YES

Comments

There are no comments at the moment.