#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    ll n;
    cin >> n;
    if ((n / 7) % 2 == 0 && n > 14 && n % 14 != 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
