#include <bits/stdc++.h>
using namespace std;
int main() {
  long long kkk, kk, otv = 0;
  string ss;
  map<long long, long long> v;
  map<long long, long long>::reverse_iterator ii;
  long long a, s, i, j;
  cin >> kkk;
  for (kk = 0; kk < kkk; kk++) {
    long long a, i, j;
    cin >> a;
    if (a < 15)
      cout << "NO" << endl;
    else {
      if ((a % 14 <= 6) && (a % 14 != 0))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
}
