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