#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e12;
const long long ninf = -1e12;
const long long mod = 1e9 + 7;
const long double EPS = 1e-8;
template <typename A, typename B>
bool mini(A &x, const B &y) {
  if (y < x) {
    x = y;
    return true;
  }
  return false;
}
template <typename A, typename B>
bool maxi(A &x, const B &y) {
  if (y >= x) {
    x = y;
    return true;
  }
  return false;
}
void run() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    long long a;
    cin >> a;
    if (a <= 14) {
      cout << "NO" << '\n';
      continue;
    }
    a %= 14;
    if (a == 0) {
      cout << "NO" << '\n';
      continue;
    }
    if (a < 7) {
      cout << "YES" << '\n';
      continue;
    }
    cout << "NO" << '\n';
    continue;
  }
  return;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  srand(time(nullptr));
  long long que = 1;
  for (long long i = 0; i < que; ++i) {
    run();
  }
  return 0;
}
