import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio;

void main() {
    auto T = readln.chomp.to!int;
    auto A = readln.split.map!(to!long).array;
    foreach (a; A) {
        auto m = a % 14;
        if (a <= 14) {
            writeln("NO");
        } else if (m != 0 && m <= 6) {
            writeln("YES");
        } else {
            writeln("NO");
        }
    }
}
