n = int(eval(input()))

string = "No"

for i in range(1, n+1):

        for j in range(1, n+1):

            if n % (4 * i + 7 * j) == 0:

                string = "Yes"

                break

            elif n % (4 * i) == 0:

                string = "Yes"

                break

            elif n % (7 * j) == 0:

                string = "Yes"

                break



print(string)
n = int(eval(input()))

string = "No"

for i in range(n+1):

        for j in range(n+1):

            if n == 4*i + 7*j :

                string = "Yes"

                break



print(string)
n = int(eval(input()))
string = "No"
for i in range(1, n + 1):
    for j in range(1, n + 1):
        if n % (4 * i + 7 * j) == 0:
            string = "Yes"
            break
        elif n % (4 * i) == 0:
            string = "Yes"
            break
        elif n % (7 * j) == 0:
            string = "Yes"
            break
print(string)

n = int(eval(input()))
string = "No"
for i in range(n + 1):
    for j in range(n + 1):
        if n == 4 * i + 7 * j:
            string = "Yes"
            break
print(string)

-for i in range(1, n + 1): -    for j in range(1, n + 1): -        if n % (4 * i + 7 * j) == 0: -            string = "Yes" -            break -        elif n % (4 * i) == 0: -            string = "Yes" -            break -        elif n % (7 * j) == 0: +for i in range(n + 1): +    for j in range(n + 1): +        if n == 4 * i + 7 * j: