def is_fib(n):
	a, b = 1, 1
	while a < n:
		a, b = b, a + b
	return a == n

IN = open('mushrooms.in')
n = int(IN.readline())
open('mushrooms.out', 'w').write(\
	'\n'.join(\
		{True: 'Yes', False: 'No'}[is_fib(int(IN.readline()))] for i in range(n)\
	)\
)
	
