def judge(a):

    global flg

    if a % 4 == 0 or a % 7 == 0:

        flg = 1



N = int(eval(input()))

flg = 0

judge(N)



while N > 7:

    N -= 7

    judge(N)



if flg == 1:

    print("Yes")

else:

    print("No")

N = int(eval(input()))

f = 0



if N % 4 == 0 or N % 7 == 0:

    f = 1

else:

    while N > 4:

        N -= 4

        if N % 7 == 0:

            f = 1

            break



if f == 0:

    print("No")

else:

    print("Yes")
def judge(a):
    global flg
    if a % 4 == 0 or a % 7 == 0:
        flg = 1


N = int(eval(input()))
flg = 0
judge(N)
while N > 7:
    N -= 7
    judge(N)
if flg == 1:
    print("Yes")
else:
    print("No")

N = int(eval(input()))
f = 0
if N % 4 == 0 or N % 7 == 0:
    f = 1
else:
    while N > 4:
        N -= 4
        if N % 7 == 0:
            f = 1
            break
if f == 0:
    print("No")
else:
    print("Yes")

-def judge(a): -    global flg -    if a % 4 == 0 or a % 7 == 0: -        flg = 1 - - -flg = 0 -judge(N) -while N > 7: -    N -= 7 -    judge(N) -if flg == 1: +f = 0 +if N % 4 == 0 or N % 7 == 0: +    f = 1 +else: +    while N > 4: +        N -= 4 +        if N % 7 == 0: +            f = 1 +            break +if f == 0: +    print("No") +else: -else: -    print("No")