#include <bits/stdc++.h>
using namespace std;
void Solve() {
  long long x;
  cin >> x;
  long long t = x % 14;
  if (x >= 15 && t >= 1 && t <= 6)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  cin.tie(0);
  cout.tie(0);
  iostream::sync_with_stdio(0);
  int t;
  cin >> t;
  for (; t; t--) Solve();
}
