#include <bits/stdc++.h>
const long long M = 1e9 + 7;
const long long N = 3e5 + 10;
const double pi = 3.14159265358979323846;
using namespace std;
signed main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long x = n % 14;
    long long y = n / 14;
    if (x > 6 || x == 0 || y == 0)
      cout << ("NO") << "\n";
    else
      cout << ("YES") << "\n";
  }
  return 0;
}
