#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n;
  cin >> t;
  vector<long long int> a;
  while (t--) {
    cin >> n;
    a.push_back(n);
  }
  for (long long int x : a) {
    if (x > 21) x = x % 14 + 14;
    if (x >= 15 && x <= 20)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
