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