public void solve() {
    Scanner in = new Scanner(System.in);
    Prime prime = new Prime(100000);
    int[] a = prime.getPrimeArray();
    int test = in.nextInt();
    out:
    for (int t = 0; t < test; t++) {
      int n = in.nextInt();
      for (int i = 0; i < a.length; i++) {
        if (n % a[i] == 0) {
          int x = n / a[i];
          if (isPrime(x)) {
            System.out.println("Yes");
            continue out;
          }
        }
      }
      System.out.println("No");
    }
  }