#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve(){
    ll n;
    cin>>n;
    int a[7]={1,4,7,9,10,12,13};
    if(n<=14){
        for(auto &x : a){
            if(n == x){
                cout << "Yes" << endl;
                return;
            }
        }
        cout << "No" << endl;
    }else{
        cout << "Yes" << endl;
    }
}
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
}