#include using namespace std; typedef long long ll; struct sieve { vector s; sieve(int n) : s(n + 1) { for (ll i = 0; i <= n; i++) { s[i] = i; } for (ll i = 2; i <= n; i++) { if (s[i] == i) { for (ll j = i * i; j <= n; j += i) { if (s[j] == j) { s[j] = i; } } } } } vector> primeFac(int n) { vector> res; while (n != 1) { int p = s[n], cnt = 0; while (s[n] == p) { n /= p; cnt++; } res.push_back(pair(p, cnt)); } return res; } bool isPrime(int n) { if (n <= 1) return false; return (s[n] == n); } }; int main() { int tt; cin >> tt; // const int M = 100000; // vector dp(M, false); // dp[0] = true; // sieve s(M); // for (int i = 0; i < M; i++) { // if (s.isPrime(i)) { // for (int j = M - 1; j >= 0; j--) { // if (dp[j] && j + i < M) { // dp[j + i] = true; // } // } // } // } // for (int i = 10; i < M; i++) { // assert(dp[i]); // } // cout << "OK" << endl; while (tt--) { int n; cin >> n; if (n == 1 || n == 4 || n == 6) { cout << "No" << endl; } else { cout << "Yes" << endl; } } return 0; }