#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int ac = 2e3 + 10;
int A[ac];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    if (a < 10) {
      cout << "NO\n";
      continue;
    }
    a %= 14;
    if (a > 0 && a < 7)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
