#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  unsigned long long t, a;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    cin >> a;
    if (a <= 14) {
      cout << "NO" << endl;
    } else {
      a = a % 14;
      if (a >= 1 && a <= 6) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
}
