import java.io.*;
import java.math.BigInteger;

import static java.math.BigInteger.*;

public class mushrooms_ak_bigint {
    static boolean isFib(BigInteger n) {
        BigInteger a = ONE;
        BigInteger b = ONE;
        while (a.compareTo(n) < 0) {
            BigInteger oldB = b;
            b = b.add(a);
            a = oldB;
        }
        return n.equals(a);
    }

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