#Lutece0512. Saya and Mersenne primes

Saya and Mersenne primes

Migrated from Lutece 512 _Saya and Mersenne primes _

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

(Ougai’s diary)

--I have confirmed that his intellect far surpasses any human's.

--This morning, I taught him about prime numbers. After I explained the Mersenne primes (the prime which can be expressed as 2p12^p-1), he immediately began to list examples that he had calculated in his head. I was only able to confirm by memory up to number 1010, M89, but he continued to list further examples without any trouble. I left him to his calculations, and, when I returned a few hours later, I discovered that he had written down more than 7070 of them. Computers all over the world are currently working to calculate Mersenne primes, but the last one I remember being found was number 4747 back in 20092009.

......

So Ougai had to write a program to judge whether the Saya primes was correct.

Input

First line contains an integer TT(1T301\leq T\leq 30), the number of test cases.

Then T lines follows. There is only one integer nn(2n2402\leq n\leq 2^{40}) which is calculated out by Saya in each line.

Output

For each test case, just output one line.

First output Case #C: ,where CC is number of test case which is from 11 to TT.Then, if the number is Mersenne primes, output Yes. Otherwise, output No.

Samples

4
3
7
4
13
Case #1: Yes
Case #2: Yes
Case #3: No
Case #4: No

Resources

Ougai’s Researchs@蒲公英的黄昏