fork download
  1. from sets import Set
  2. a = Set([0,1])
  3. b = 10**1000
  4. f1 = 0
  5. f2 = 1
  6. while f2 <= b:
  7. f3 = f1 + f2
  8. a.add(f3)
  9. f1 = f2
  10. f2 = f3
  11. t = int(raw_input())
  12. while t:
  13. t = t-1;
  14. c = int(raw_input())
  15. if c in a:
  16. print('YES')
  17. else:
  18. print('NO')
Success #stdin #stdout 0.02s 8928KB
stdin
1
10256117644121029666
stdout
NO