#P1198. Fibonacci Cane

    ID: 199 远端评测题 1000ms 128MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>湖南省第十八届大学生计算机程序设计竞赛(HNCPC2022)

Fibonacci Cane

Description

Bob likes Fibonacci numbers too much. When he buys sugar canes, he hopes that the length of the sugar cane is a continuous sum of Fibonacci sequence.

Fibonacci sequence is a sequence that: f0 = 1, f1 = 1, …, fn = fn − 1 + fn − 2.

He asks you to help determine whether a sugar cane is what he wants.

Input

No more than 1000 test cases. Each case contains a positive integer n, the length of a sugar cane.

1 ≤ n ≤ 1015

Output

Output YES if the length is a continuous sum of the Fibonacci sequence, otherwise output NO.

1
2
5
9
10
YES
YES
YES
NO
YES