Check if the number is Fibonacci
Submissions: 2274   Accuracy:

51.31%

  Difficulty: Basic   Marks: 1

Check if a given number is Fibonacci number. Fibonacci number is a number which occurs in Fibonacci series.

Input:
The first line of input contains an integer T denoting the number of test cases.
Each test case contains a number.

Output:
Print "Yes" if the entered number is Fibonacci number else "No".
 
Constraints:
1<=t<=100
1<=n<=100

Example:

Input
2
34
41

Output
Yes

No

** For More Input/Output Examples Use 'Expected Output' option **

Author: Yash Goel


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.