#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n >= 15) {
      unsigned long long int flag = n % 14;
      if (flag <= 6 && flag >= 1) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
