#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long c = 0;
    for (long long i = 1; i <= 6; i++) {
      if ((n + i - 7) % 14 == 0 && (n + i - 7) != 0) {
        c = 1;
        break;
      }
    }
    if (c == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
