#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
int T, n, m;
int a, b, c, d;
long long x;
void solve() {
  if (x < 15) {
    cout << "NO" << endl;
    return;
  }
  x %= 14;
  x += 14;
  if (x < 15 || x > 20) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
}
void init() { cin >> x; }
int main() {
  cin >> T;
  while (T--) {
    init();
    solve();
  }
  return 0;
}
