#include <bits/stdc++.h>
using namespace std;
int64_t TN = 1;
void solve() {
  int64_t n;
  cin >> n;
  if (n % 14 <= 6 && n > 14 && n % 14 > 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
int main() {
  cin >> TN;
  for (int i = 0; i < TN; ++i) {
    solve();
  }
  return 0;
}
