#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long t, n;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n < 14) {
      cout << "NO\n";
      continue;
    }
    n %= 14;
    if (n < 7 && n > 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
