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