#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, c = 0, d = 0, max = 0;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long int i = 0; i < n; i++) {
    if (a[i] >= 1 && a[i] <= 14) {
      cout << "NO" << endl;
    } else if ((a[i] % 14) <= 6 && (a[i] % 14) >= 1) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
