Fibonacci

Time Limit: 1000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 5167
64-bit integer IO format: %I64d      Java class name: Main

Description

Following is the recursive definition of Fibonacci sequence:
$$
F_i=
\begin{cases}
0& \text{i = 0} \\
1& \text{i = 1} \\
F_{i-1} + F_{i-2}& \text{i > 1}
\end{cases}
$$
Now we need to check whether a number can be expressed as the product of numbers in the Fibonacci sequence.

Input

There is a number \(T\) shows there are \(T\) test cases below. ($T \leq 100,000$)
For each test case , the first line contains a integers n , which means the number need to be checked.
$0 \leq n \leq 1,000,000,000$

Output

For each case output "Yes" or "No".

Sample Input

3
4
17
233

Sample Output

Yes
No
Yes

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .