#include <bits/stdc++.h>
using namespace std;
int n, a;
int main() {
  cin >> a;
  while (a--)
    cin >> n,
        cout << (n <= 2 || n == 4 || n == 5 || n == 8 || n == 11 ? "NO" : "YES")
             << endl;
}
