import java.io.*;
import java.util.HashSet;
import java.util.Set;

public class mushrooms_ak_int32 {
    static int a, b;
    static Set<Integer> fibs = new HashSet<Integer>();
    static {
        a = 1; 
        b = 1;
        while (a > 0) {
            fibs.add(b);
            b += a;
            a = b - a;
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader(new File("mushrooms.in")));
        int n = Integer.parseInt(br.readLine());
        PrintWriter out = new PrintWriter("mushrooms.out");
        for (int i = 0; i < n; i++)
            out.println(fibs.contains(Integer.parseInt(br.readLine())) ? "Yes" : "No");
        out.close();
    }
}
