#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int main() {
  long long int t;
  cin >> t;
  long long int a[t];
  for (long long int i = 0; i < t; i++) {
    cin >> a[i];
    if (a[i] < 15) {
      cout << "NO" << endl;
    } else if (a[i] < 21 && a[i] >= 15) {
      cout << "YES" << endl;
    } else if (a[i] % 14 == 1 || a[i] % 14 == 2 || a[i] % 14 == 3 ||
               a[i] % 14 == 4 || a[i] % 14 == 5 || a[i] % 14 == 6) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
