#include <bits/stdc++.h>
using namespace std;
class dsu {
 private:
  vector<int> p, rank;
  int ns;

 public:
  dsu(int N) {
    rank.assign(N, 0);
    p.assign(N, 0);
    ns = N;
    for (int i = 0; i < N; i++) {
      p[i] = i;
    }
  }
  int findSet(int s1) {
    if (p[s1] == s1) {
      return s1;
    } else {
      int fs = findSet(p[s1]);
      p[s1] = fs;
      return fs;
    }
  }
  bool isSameSet(int s1, int s2) { return findSet(s1) == findSet(s2); }
  void unionSet(int s1, int s2) {
    if (!isSameSet(s1, s2)) {
      ns--;
      int x = findSet(s1);
      int y = findSet(s2);
      if (rank[x] > rank[y]) {
        p[y] = x;
      } else {
        p[x] = y;
        if (rank[x] == rank[y]) {
          rank[y]++;
        }
      }
    }
  }
  int numSets() { return ns; }
};
long long gcd(long long a, long long b) {
  if (a > b) {
    long long oa = a;
    a = b;
    b = oa;
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
vector<long long> readList(int n) {
  vector<long long> a;
  for (int i = 0; i < n; i++) {
    long long b;
    cin >> b;
    a.push_back(b);
  }
  return a;
}
void printList(vector<int> l) {
  int n = ((int)l.size()) - 1;
  for (int i = 0; i < n; i++) {
    cout << l[i];
    if (i < n - 1) {
      cout << " ";
    } else {
      cout << endl;
    }
  }
}
vector<vector<int> > readGraph(int n, int m) {
  vector<vector<int> > al;
  for (int i = 0; i < n; i++) {
    vector<int> c;
    al.push_back(c);
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    al[a - 1].push_back(b - 1);
    al[b - 1].push_back(a - 1);
  }
  return al;
}
vector<bool> vis;
vector<int> gf[200010];
void solve() {
  int n;
  scanf("%d", &n);
  vector<long long> ls = readList(n);
  for (int i = 0; i < n; i++) {
    if (ls[i] % 14 >= 1 && ls[i] % 14 <= 6 && ls[i] >= 15) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
void querySolve() {
  int t;
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    solve();
  }
}
int main() { solve(); }
