#K69552. Fibonacci Number Checker

    ID: 33111 Type: Default 1000ms 256MiB

Fibonacci Number Checker

Fibonacci Number Checker

Given an integer, determine if it is a Fibonacci number. A number \(n\) is a Fibonacci number if and only if one of the expressions \(5n^2+4\) or \(5n^2-4\) is a perfect square. The Fibonacci sequence is defined as \(F_0=0\), \(F_1=1\), and \(F_n = F_{n-1} + F_{n-2}\) for \(n \ge 2\). Note that 0 is considered a Fibonacci number.

inputFormat

The first line contains a single integer \(T\), the number of test cases. Each of the following \(T\) lines contains one integer \(n\) to be checked.

outputFormat

For each test case, output a single line containing "YES" if the number is a Fibonacci number, or "NO" otherwise.

## sample
4
1
4
8
13
YES

NO YES YES

</p>