#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  long long q;
  cin >> q;
  while (q--) {
    long long n;
    cin >> n;
    if (n < 15) {
      cout << "NO\n";
      continue;
    }
    n %= 14;
    bool ok = false;
    for (long long i = 1; i <= 6; i++) ok |= (n == i);
    cout << (ok ? "YES\n" : "NO\n");
  }
  return 0;
}
