#include <bits/stdc++.h>
using namespace std;
long long int i, j, k;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int d[7] = {15, 16, 17, 18, 19, 20};
    int flag = 0;
    long long int n;
    cin >> n;
    if (n <= 14) {
      cout << "NO" << endl;
      continue;
    }
    for (i = 0; i < 6; i++) {
      if ((n - d[i]) % 14 == 0) {
        flag = 1;
        break;
      }
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
