#C3730. Fibonacci Number Verification
Fibonacci Number Verification
Fibonacci Number Verification
You are given a single integer (n). Your task is to determine whether (n) is a Fibonacci number. A number (n) is a Fibonacci number if and only if at least one of the following expressions is a perfect square:
[ 5n^2 + 4 ]
or
[ 5n^2 - 4 ]
If either expression is a perfect square, output the string Yes
; otherwise, output No
.
Note: In this problem, 0 is considered a Fibonacci number.
inputFormat
Input is read from standard input (stdin). The input consists of a single integer (n).
outputFormat
Output to standard output (stdout) a single line containing either Yes
if (n) is a Fibonacci number, or No
otherwise.## sample
5
Yes