#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, x, q, r;
  cin >> t;
  while (t--) {
    cin >> x;
    if (x < 15) {
      cout << "NO\n";
    } else if (x >= 15 && x <= 20) {
      cout << "YES\n";
    } else {
      q = x / 14;
      r = x - ((q - 1) * 14);
      if (r >= 15 && r <= 20) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    }
  }
}
