N = int(eval(input()))

ret = "No"

for c_i in range(N + 1):

    for d_i in range(N + 1):

        total = 4 * c_i + 7 * d_i

        if total == N:

            ret = "Yes"

            break

print(ret)

N = int(eval(input()))

ret = "No"

for c_i in range(N // 4 + 1):

    for d_i in range(N // 7 + 1):

        total = 4 * c_i + 7 * d_i

        if total == N:

            ret = "Yes"

            break

print(ret)

N = int(eval(input()))
ret = "No"
for c_i in range(N + 1):
    for d_i in range(N + 1):
        total = 4 * c_i + 7 * d_i
        if total == N:
            ret = "Yes"
            break
print(ret)

N = int(eval(input()))
ret = "No"
for c_i in range(N // 4 + 1):
    for d_i in range(N // 7 + 1):
        total = 4 * c_i + 7 * d_i
        if total == N:
            ret = "Yes"
            break
print(ret)

-for c_i in range(N + 1): -    for d_i in range(N + 1): +for c_i in range(N // 4 + 1): +    for d_i in range(N // 7 + 1):