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