#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long x;
  cin >> x;
  if (x >= 15 && x % 14 <= 6 && x % 14 > 0) {
    cout << "YES" << '\n';
  } else {
    cout << "NO" << '\n';
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
}
