#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t, q, n, prev, maxx, i, j, k1, k2, k3, k, x, y, flag, sum, cnt, ans;
  cin >> t;
  string ss;
  while (t--) {
    cin >> n;
    flag = 0;
    if (n < 21) {
      for (i = 1; i < 7; i++) {
        if ((n + i) % 21 == 0) flag = 1;
      }
      (flag) ? cout << "YES\n" : cout << "NO\n";
    } else {
      for (i = 1; i < 7; i++) {
        if ((n + i - 7) % 14 == 0) flag = 1;
      }
      (flag) ? cout << "YES\n" : cout << "NO\n";
    }
  }
  return 0;
}
