#include <bits/stdc++.h>
using namespace std;
int t, i, j;
long long x;
int main() {
  cin >> t;
  for (i = 0; i < t; i++) {
    cin >> x;
    if (x <= 6 || x % 14 == 0) {
      cout << "NO" << endl;
      continue;
    }
    if (x % 14 <= 6 && x > 6)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
