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