#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9) + 7;
const int MAXSIZE = int(1e5) + 5;
const int MAX = 15000000;
const long long N = 10002;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long m = n;
    bool flag = false;
    for (long long i = 15; i <= 20; ++i) {
      long long x = n - i;
      if (x >= 0 and x % 14 == 0) {
        cout << "YES\n";
        flag = true;
        break;
      }
    }
    if (!flag) cout << "NO\n";
  }
  return 0;
}
