#include <bits/stdc++.h>
using namespace std;
set<int> f;
vector<pair<signed long long, signed long long>> v2;
vector<int> v;
map<char, int> m, m1;
signed long long a, i, j, t, p;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> t;
  while (t--) {
    cin >> a;
    p = a % 14;
    if (p >= 1 && p <= 6 && a >= 15)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
