#include <bits/stdc++.h>
using namespace std;
long long sumdigit(long long num) {
  long long sum = 0;
  while (num != 0) {
    sum = sum + num % 10;
    num = num / 10;
  }
  return sum;
}
int even(string s) {
  int ans = 0;
  for (long long i = 0; i < s.size(); i++) {
    if ((s[i] - '0') % 2 == 0) ans++;
  }
  if (ans >= 2)
    return 1;
  else
    return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long r = n;
    r = r / 14;
    long long s;
    s = n - (14 * r);
    if (s < 7 && s > 0 && n > 14)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
