#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ;
  int t;
  cin >> t;
  while (t--) {
    long long x;
    cin >> x;
    if (x <= 14) {
      cout << "NO" << '\n';
      continue;
    }
    x %= 14;
    if (x >= 1 and x <= 6)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
