#include<bits/stdc++.h> using namespace std; bool sushu(int x) { for (int i = 2; i * i <= x; i++) if (x % i == 0)return false; return true; } int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); if (sushu(n) == true) { printf("No\n"); continue; } for (int i = 2; i * i <= n; i++) { if (n % i == 0) { if (sushu(i) == true && sushu(n / i) == true) { printf("Yes\n"); break; } else { printf("No\n"); break; } } } } return 0; }