

n = int(eval(input()))

for i in range(n//4+1):

    for j in range(n//7+1):

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

            print('Yes')

            exit()

print('No')

n = int(eval(input()))

for i in range((n+3)//4+1):

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

        print('Yes')

        break

else:

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

n = int(eval(input()))
for i in range((n + 3) // 4 + 1):
    if (n - i * 4) % 7 == 0:
        print("Yes")
        break
else:
    print("No")

-for i in range(n // 4 + 1): -    for j in range(n // 7 + 1): -        if 4 * i + 7 * j == n: -            print("Yes") -            exit() -print("No") +for i in range((n + 3) // 4 + 1): +    if (n - i * 4) % 7 == 0: +        print("Yes") +        break +else: +    print("No")