#include <bits/stdc++.h>
using namespace std;
bool flag;
int t;
unsigned long long int xi;
int main() {
  cin >> t;
  while (t--) {
    cin >> xi;
    flag = false;
    if (xi < 15) {
      cout << "NO\n";
      flag = true;
    } else {
      for (int i = 1; i <= 6; ++i) {
        if ((xi - 7 + i) % 14 == 0) {
          cout << "YES\n";
          flag = true;
          break;
        }
      }
    }
    if (!flag) cout << "NO\n";
  }
  return 0;
}
