#K51632. Mystic Numbers
Mystic Numbers
Mystic Numbers
You are given an integer T and a sequence of T integers. For each integer, determine whether it is a Mystic Number. A number is called a Mystic Number if the number of 1's in its binary representation is a prime number.
Recall that a prime number is defined as an integer \( p > 1 \) that has no positive divisors other than 1 and itself. In other words, if \( f(x) \) denotes the number of 1's in the binary representation of an integer \( x \), then \( x \) is Mystic if and only if \( f(x) \) is a prime number.
The output for each integer should be Yes if the number is Mystic, and No otherwise.
inputFormat
The first line of the input contains an integer T indicating the number of test cases. The second line contains T space-separated integers.
outputFormat
For each of the T integers, output a single line containing Yes if the number is Mystic, or No otherwise.
## sample5
6 7 8 10 15
Yes
Yes
No
Yes
No
</p>