Problem:
 Score : 200 points    Problem Statement La Confiserie d'ABC sells cakes at 4 dollars each and doughnuts at 7 dollars each.
Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.      Constraints  N is an integer between 1 and 100 , inclusive.         Input Input is given from Standard Input in the following format:  N       Output If there is a way to buy some cakes and some doughnuts for exactly N dollars, print Yes ; otherwise, print No .        Sample Input 1 11      Sample Output 1 Yes  If you buy one cake and one doughnut, the total will be 4 + 7 = 11 dollars.       Sample Input 2 40      Sample Output 2 Yes  If you buy ten cakes, the total will be 4 \times 10 = 40 dollars.       Sample Input 3 3      Sample Output 3 No  The prices of cakes ( 4 dollars) and doughnuts ( 7 dollars) are both higher than 3 dollars, so there is no such way.

Solution (Python):
n = int(input())
if n in [1, 2, 3, 5, 6, 9, 10, 13, 17]:
    print('No')
else:
    print ('Yes')

Solution (Python):
a = int(input())
b = [0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100]
c = [0,7,14,21,28,35,42,49,56,63,70,77,84,91,98]
d = 0

for i in range(len(b)):
	for j in range(len(c)):
		if b[i] + c[j] == a:
			print("Yes")
			d = 1
			break
	if d == 1:
		break
if d == 0:
	print("No")

Solution (Python):
N = int(input())

def func(n):
  cake = [4,7]
  for i in cake:
    new_n = n - i
    if new_n == 0:
      print('Yes')
      exit()
    elif new_n < 0:
      return 0
    else:
      func(new_n)

func(N)
print('No')

Solution (Python):
N = int(input())

a = N%7
b = N//7
if a == 0:
    print("Yes")
    quit()
for k in range(b+1):
    if a%4 == 0:
        print('Yes')
        quit()
        
    a+=7
print('No')

Solution (Python):
N = int(input())
flag = True

for i in range(N // 7 + 1):
	if (N - i*7) % 4 == 0:
		print("Yes")
		flag = False
		break
		
if flag:
	print("No")

Solution (Python):
N=int(input())

for i in range(26):
    for j in range(16):
        if 4*i+7*j == N:
            print('Yes')
            quit()
        else:
            pass
print('No')

Solution (Python):
n = int(input())

i = 0
while n - 7 * i > 0:
     x = n - 7 * i
     if x % 4 ==0:
         print("Yes")
         break
     i += 1
else:
    if n % 7 ==0:
        print("Yes")
    else:
        print("No")

Solution (Python):
N=int(input())
flag=0
for A in range(26):
  for B in range(15):
    if 4*A+7*B==N:
      flag=1
if flag==1:
  print("Yes")
else:
  print("No")

Solution (Python):


n = int(input().strip())

success = False
for i in range(26):
    for j in range(15):
        if (4 * i + 7 * j) == n:
            success = True
            break

if success:
    print('Yes')
else:
    print('No')

Solution (Python):
a = int(input())
answer = False
for i in range(0, a//4 + 1):
	if (a - i*4) % 7 == 0:
		print ('Yes')
		answer = True
		break
		
if answer== False:
	print ('No')

Solution (Python):
N = int(input())


while(N > 0):
	if not N % 4:
		print("Yes")
		break

	N -= 7
else:
	if not N:
		print("Yes")
	else:
		print("No")

Solution (Python):
n = int(input())

all_num = set()
for a in range(100):
    for b in range(100):
        v = a * 4 + b * 7
        if v <= 100:
            all_num.add(v)
if n in all_num:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())

S = 1 + int(N / 7)
F = 1 + int(N / 4)
for s in range(S):
    for f in range(F):
        if 7 * s + 4 * f == N:
            print("Yes")
            quit()


print("No")

Solution (Python):
N = int(input())
tmp = [0] * 101
tmp[1] = tmp[2] = tmp[3] = 0
tmp[4] = tmp[7] = 1
for k in range(4, 101):
  if tmp[k] == 0:
    continue
  if k + 4 <= 100:
    tmp[k + 4] += 1
  if k + 7 <= 100:
    tmp[k + 7] += 1
ans = 'Yes' if tmp[N] >= 1 else 'No'
print(ans)

Solution (Python):
import sys
N = int(input())
for i in range(30):
    for j in range(30):
        tmp = 4*i+7*j
        if tmp <= 100:
            if tmp == N:
                print("Yes")
                sys.exit(0)
        else:
            break
print("No")

Solution (Python):
N= int(input())
if N>17 or (N<17 and N>13) or N==12 or N==11 or N==8 or N==7 or N==4:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
flg = False
for i in range(25):
    sums = i * 4
    while sums <= n:
        if sums == n:
            flg = True
            break
        sums += 7
if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())

for i in range(0,14):
        for j in range(0,25):
                if N == 7*i+4*j:
                        print("Yes")
                        break
        else:
                continue
        break
else:
        print("No")

Solution (Python):
N = int(input())
ans = "No"
i7 = 0


while(True):
    N -= i7 * 7
    if N < 0:
        break
    if N % 4 == 0 or N == 0:
        ans = "Yes"
        break
    i7 += 1

print(ans)

Solution (Python):
N = int(input())
flag = False
for n in range(int(N//4)+1):
    for m in range(int(N//7)+1):
        if (4*n) + (7*m) == N:
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())

q=int(n/7)
flag=0

for i in range(q+1):
  if (n-7*i)%4==0:
    flag=1
    break

if flag==0:
  print("No")
else:
  print("Yes")

Solution (Python):
n=int(input())

value=[]

for i in range(100):
    for j in range(100):
        value.append(4*i+7*j)

if n in value:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
if N <= 3 or N == 5 or N == 6 or N == 9 or N == 10 or N == 13 or N == 17:
    print("No")
else:
    print("Yes")

Solution (Python):
def main():
    n = int(input())
    flag = False
    for i in range(0, 26):
        for j in range(0, 15):
            sumv = 4 * i + 7 * j
            if ( sumv == n ):
                flag = True
                break
        if flag:
            break
    if flag:
        print('Yes')
    else:
        print('No')
        
if __name__ == '__main__':
  main()

Solution (Python):
N = int(input())
for i in range(0, 26):
    for j in range(0, 25):
        if 4 * i + 7 * j == N:
            print('Yes')
            exit()
print('No')

Solution (Python):
import sys
n = int(input())

for i in range(100):
    for j in range(100):
        if i == 0 and j == 0:
            continue
        if n % (i * 4 + j * 7) == 0:
            print('Yes')
            sys.exit()
print('No')

Solution (Python):
N = int(input())






ans = "Yes"

if N < 4:
    ans = "No"
elif 5<=N<=6:
    ans = "No"
elif 9<=N<=10:
    ans = "No"
elif 13<=N<=14:
    ans = "No"
elif 17==N:
    ans = "No"



print(ans)

Solution (Python):
X=int(input())
Y=X
Z=X
F=0
while F==0 and (Y>=0 or Z>=0):
	Y-=4
	Z-=7
	if Y%7==0 and (Y>=7 or Y==0):
		F=1
		break
	if Z%4==0 and (Z>=4 or Z==0):
		F=1
		break
if F==1:
	print("Yes")
else:
	print("No")

Solution (Python):

N = int(input())

a4 = N // 4

ans = False
for i in range(a4+1):
	if (N - i*4) % 7 == 0:
		ans = True
		break

if ans:
	print("Yes")
else:
	print("No")

Solution (Python):
N = int(input())

for f in range(0, 25):
    for s in range(0, 14):
        if f*4 + s*7 == N:
            print("Yes")
            exit()
else:
    print("No")

Solution (Python):
N = int(input())

flag = 0

for i in range((N // 4) + 1):
  for j in range((N // 7) + 1):
    if 4*i + 7*j == N:
      print("Yes")
      flag = 1
      break
  if flag == 1:
    break
      
if flag == 0:
  print("No")

Solution (Python):
n = int(input())

for i in range(1000):
	for j in range(1000):
		if 4*i + 7*j == n:
			print 'Yes'
			quit()

print 'No'

Solution (Python):
N = int(input())

if N <= 3 or 5<= N <= 6:
    print("No")
else:
    while True:
        if N < 0:
            print("No")
            break
        elif N%4 == 0:
            print("Yes")
            break
        N = N-7

Solution (Python):
li = list(map(int,input().split()))
n=li[0]
for i in range(0,15):
    a = n - i*7
    if a<0:
        print("No")
        break
    if a%4 == 0:
        print("Yes")
        break

Solution (Python):
N = int(raw_input())
retval = False
if N < 4:
    retval = False
else:
    x_max = N/4
    y_max = N/7
    for i in range(1, x_max+1):
        if (N - i*4) % 7 == 0:
            retval = True
            break
    for i in range(1, 1+y_max):
        if (N - i*7) % 4 == 0:
            retval = True
            break
if retval:
    print 'Yes'
else:
    print 'No'

Solution (Python):
def solve(N):
    e = lambda x, y, N: (4*x + 7*y) == N
    for x in range(N//4+1):
        for y in range(N//7+1):
            if e(x, y, N):
                print("Yes")
                return
    else:
        print("No")

N = int(input())
solve(N)

Solution (Python):
N = int(input())
multi4 = range(0,101,4)
multi7 = range(0,101,7)
bigmulti = set()
for i in multi4:
    for j in multi7:
        bigmulti.add(i+j)
if N in bigmulti:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
dp = [0] *101
dp[0] = 1
for i in range(4,101):
  if dp[i-4] != 0:
    dp[i] = 1
for i in range(7,101):
  if dp[i-7] != 0:
    dp[i] = 1
if dp[n] == 1:
  print("Yes")
else:
  print("No")

Solution (Python):


N = int(input())

i = 0
while i * 4 <= 100:
    j = 0
    while j * 7 <= 100:
        if i * 4 + j * 7 == N:
            print("Yes")
            exit()
        j += 1
    i += 1
print("No")

Solution (Python):
def main():
    N = int(input())
    for i in range(N//4+1):
        if (N-4*i)%7 == 0:
            return "Yes"
    return "No"

if __name__ == "__main__":
    print(main())

Solution (Python):

import math

if __name__ == "__main__":
    N = int(input())

    if N == 7:
        print("Yes")
        exit()

    max_7 = math.floor(N / 7)
    for i in range(max_7, -1, -1):
        rest = N - i*7
        if rest%4 == 0:
            print("Yes")
            exit()

    print("No")

Solution (Python):
n = int(input())
l4 = n//4
l7 = n//7
judge = False

for i in range(l4+1):
    for j in range(l7+1):
        sum = i * 4 + j * 7
        if n == sum:
            judge = True
            break


if judge:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())

cost = 0
for i in range(0,16):
    for j in range(0,26):
        cost = 7 * i + 4 * j
        
        if cost == N:
            print("Yes")
            exit()

print("No")

Solution (Python):
N = int(input())

def solve(N):
    for i in range(N // 4 + 1):
        for j in range(N // 7 + 1):
            if 4 * i + 7 * j == N:
                return True
    else:
        return False

if solve(N):
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
N = int(input())
for i in range(26):
    for j in range(100):
        c = 4 * i
        d = 7 * j
        if c + d > N:
            break

        if c + d == N:
            print("Yes")
            sys.exit()


print("No")

Solution (Python):
N=input()
for x in range(26):
	for y in range(16):
		if N==4*x+7*y:
			print "Yes"
			quit()
else:
	print "No"

Solution (Python):
N = int(input())

four = int(N/4)
seven = int(N/7)

flag=0

for i in range(1,four+1):
    sum = 4*i
    while(sum<=N):
        if(sum==N):
            flag=1
        sum+=7

for i in range(1,seven+1):
    sum2 = 7*i
    while(sum2<=N):
        if(sum2==N):
            flag=1
        sum2+=4
    
if(flag==1):
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())

ans = False

for i in range(0, N+1, 7):
    tmp = N - i
    if tmp % 4 == 0:
        ans = True
        break

if ans:
    print('Yes')
else:
    print('No')

Solution (Python):



def main():
    n = int(input())

    for i in range(0, 100 + 1):
        for j in range(0, 100 + 1):
            if (4 * i + 7 * j) == n:
                print('Yes')
                exit()

    print('No')


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
i = 0
while((N-4*i)>=0):
	if((N-4*i)%7 == 0):
		print("Yes")
		break
	i += 1
if(i==int(N/4)+1):
	print("No")

Solution (Python):
n = int(input())

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

Solution (Python):

"""
Created on Sat Aug 11 17:33:57 2018
ABC105B
@author: maezawa
"""

n = int(input())

ans = 'No'

for m in range(26):
    for l in range(15):
        if 4*m + 7*l == n:
            ans = 'Yes'
            break
print(ans)

Solution (Python):
A = int(input());
answer_no = [1,2,3,5,6,9,10,13,17];
answer = 1

for i in answer_no:
    if(A==i):
        answer=0;

if(answer==1):
    print("Yes");
else:
    print("No");

Solution (Python):
from math import floor

def main():
    n = int(input())

    seven = floor(n/7)
    for i in range(seven+1):
        mod = n - i*7
        if mod % 4 == 0:
            print('Yes')
            return
    print('No')


main()

Solution (Python):
n = int(input())
m = n
ret = "No"
while(m > 0):
  if m % 4 == 0:
    ret = "Yes"
    break
  else:
    m = m - 7
if m == 0:
  ret = "Yes"
print(ret)

Solution (Python):
N = int(input())

cand = [4*i for i in range(1, 100 // 4 + 1)]+[7*i for i in range(1, 100 // 7 + 1)]
cand = cand + [c + 7*i for c in cand for i in range(1,15)]

if N in set(cand):
    print('Yes')
else:
    print('No')

Solution (Python):







n=int(input())


ok=0
for i in range(100):
    if n>=4*i and (n-4*i)%7 == 0:
        ok = 1
        break

if ok==0:
    print("No")
else:
    print("Yes")

Solution (Python):
N = int(input())

while True:
  if N % 4 == 0 or N % 7 == 0:
    print("Yes")
    exit()
  N -= 11
  if N < 0:
    print("No")
    exit()

Solution (Python):
n = int(input())
flag = False
for i in range(n//4+1):
    for j in range(n//7+1):
        if i * 4 + j * 7 == n:
            flag = True

if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
def calc(N):
    max_num_cake = N / 4
    max_num_donut = N / 7
    for i in range(max_num_cake + 1):
        for j in range(max_num_donut + 1):
            if 4 * i + 7 * j == N:
                return True
    return False

N = input()
if calc(N):
    print 'Yes'
else:
    print 'No'

Solution (Python):
N = int(input())

ans = "No"
for i in range(N // 7 + 1):
    for j in range(N // 4 + 1):
        if (7*i + 4*j == N):
            ans = 'Yes'

print(ans)

Solution (Python):
a = int(input())
max_i = a // 7

for i in range(max_i + 1):
    b = a - i * 7
    if b % 4 == 0:
        print("Yes")
        exit(0)

print("No")

Solution (Python):
n = int(input())
for i in range(25):
  for j in range(14):
    if i * 4 + j * 7 == n:
      print("Yes")
      exit()
print("No")

Solution (Python):
N=int(input())


check=0
for i in range(25):
    if (N-i*4)/7>=0 and (N-i*4)%7==0:
        check=1
        

if check==1:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
for i in range(14):
    for j in range(20):
        if n == 7*i + 4*j:
            print("Yes")
            exit()
        else:
            continue
print("No")

Solution (Python):
n = int(input())
flag = False
for i in range(26):
    for j in range(15):
        if i*4 + j*7 == n:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
a=N//4;b=N//7
for i in range(a+1):
    for j in range(b+1):
        if i*4+j*7==N:
            print("Yes")
            quit()
print("No")

Solution (Python):
N = int(input())
l = []
for i in range(100):
    for j in range(100):
        if (i*4+j*7 <= 100):
            l.append(i*4+j*7)
if N in l:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())

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

Solution (Python):
n = int(input())
cake = 4
donuts = 7
check = 0
for i in range(26):
    for j in range(15):
        ans = cake*i+donuts*j
        if (ans == n) and (check == 0):
            print('Yes')
            check = 1
if check == 0:
    print('No')

Solution (Python):
N = int(input())
i = 0
for i1 in range(26):
    for i2 in range(15):
        if 4 * i1 + 7 * i2 == N:
            i = 1
if i == 1:
    print("Yes")
elif i == 0:
    print("No")

Solution (Python):
n = int(input())
f = 0
for i in range(7):
    if (n-4*i)>=0 and (n-4*i)%7 == 0:
        print("Yes")
        f = 1
if f == 0:
    print("No")

Solution (Python):
n = int(input())

invalid = True
while n > 0:
    if n%7 == 0 or n%4 == 0:
        print('Yes')
        invalid = False
        break
    else:
        n -= 4
        
if invalid:
    print('No')

Solution (Python):
n = int(input())
ans = "No"
for x in range(0,26):
    for y in range(0,16):
        if x*4 + y*7 == n:
            ans = "Yes"
            break
print(ans)

Solution (Python):
N=int(input())

aru=0
for i in range(26):
    for j in range(16):
        if i*4+j*7==N:
            aru=1
            break
    if aru==1:
        break
    
if aru==0:
    print("No")
else:
    print("Yes")

Solution (Python):

import math,string,itertools,fractions,heapq,collections,re,array,bisect

def s():
    return input()
def n():
    return int(input())
def d():
    return float(input())

def ls():
    return input().split()
def ln():
    return map(int, input().split())
def ld():
    return map(float, input().split())

def fs():
    return [input() for i in range(input())]
def fn():
    return [int(input()) for i in range(input())]
def fd():
    return [float(input()) for i in range(input())]

N = n()


li=[]
for i in range(26):
    for j in range(16):
        li.append(i*4+j*7)

if N in li:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
if n in [1,2,3,5,6,9,10,13,17]:
    print("No")
else:
    print("Yes")

Solution (Python):
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    i = 0
    while True:
        n = N - 4 * i
        if n < 0:
            break
        if n % 7 == 0:
            print('Yes')
            return
        i += 1
    print('No')


if __name__ == '__main__':
    main()

Solution (Python):
import math
n = int(input())

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

Solution (Python):
n = int(input())
flag=False
for i in range(n//4 +1):
    if (n-4*i)%7 ==0:
        flag=True
print('Yes' if flag else 'No')

Solution (Python):
n=int(input())
a=1
while n>=0:
    if n%4==0:
        a=0
        break
    n=n-7
if a==1:
    print("No")
else:
    print("Yes")

Solution (Python):
a = int(input())
d=1
for i in range(0,25):
    for j in range(0,15):
        if a==4*i+7*j:
            d=3
if d==1:
    print("No")
else:
    print("Yes")

Solution (Python):
n=int(input())
for i in range(n//7+1):
    if (n-7*i)%4==0:print('Yes');exit()
print('No')

Solution (Python):
n = int(input())
flag = False

while n > 0:

    if n == 7:
        flag = True
        break

    elif n % 4 == 0:
        flag = True
        break

    n = n - 7

if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
def main():
    N = int(input())

    ans = f(N)
    print(ans)


def f(N):
    for f in range(25+1):
        for s in range(14+1):
            if (f * 4 + s * 7) == N:
                return "Yes"

    return "No"


if __name__ == '__main__':
    main()

Solution (Python):
import itertools

def f(n):
    cnt = n // 4 + 1
    return 'Yes' if any(a * 4 + b * 7 == n for a, b in itertools.product(range(cnt), repeat=2)) else 'No'

if __name__ == '__main__':
    n = int(input())
    print(f(n))

Solution (Python):
N = int(input())

init7 = N // 7
fl = True

for i in range(init7 + 1):
  if (N - 7 * i) % 4 == 0:
    print("Yes")
    fl = False
    break

if(fl):
  print("No")

Solution (Python):





def main(input_str):
    n = int(input_str)
    for i in range(0, 100):
        h = 7*i
        if n < h:
            break

        if 0 == (n - h) % 4:
            print('Yes')
            return
    print('No')
        
if __name__ == '__main__':
    try:
        main(input().strip())
    except EOFError:
        pass

Solution (Python):
N = int(input())
NG = [1, 2, 3, 5, 6, 9, 10, 13, 17]
print('Yes' if N not in NG else 'No')

Solution (Python):
N = int(input())
if N % 4 == 0 or N % 7 == 0:
    print("Yes")
else:
    d = N // 7
    while d > 0 and (N - d * 7) % 4 != 0:
        d -= 1
    if d == 0:
        print("No")
    else:
        print("Yes")

Solution (Python):
N = int(input())
 
k = N//4
m = N%4
if(m == 0):
  print("Yes")
elif(m == 1):
  if(k>=5):
    print("Yes")
  else:
    print("No")
elif(m==2):
  if(k>=3):
    print("Yes")
  else:
    print("No")
elif(m==3):
  if(k>=1):
    print("Yes")
  else:
    print("No")

Solution (Python):
N = int(input())

max_coef_4 = N // 4
max_coef_7 = N // 7

possible_price = set()

for coef_4 in range(max_coef_4 + 1):
    for coef_7 in range(max_coef_7 + 1):
        possible_price.add(4 * coef_4 + 7 * coef_7)

if N in possible_price:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())

for k in range(16):
    for l in range(26):
        if k*7+l*4 == N:
            print("Yes")
            exit(0)
print("No")

Solution (Python):
N = int(input())

for i in range(100):
    for j in range(100):
        if i * 4 + j * 7 == N:
            print('Yes')
            exit()

print('No')

Solution (Python):
N = int(input())

for i in range(0, 26):
    for j in range(0, 15):
        if i * 4 + j * 7 == N:
            print('Yes')
            exit()

print('No')

Solution (Python):
N = int(input())

able = False


for i in range(26):
    for j in range(16):
        numbers = 4*i + 7*j
        if numbers == N:
            able = True

if able:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
yes = any((N - 4 * i) % 7 == 0
          for i in range(N // 4 + 1))
print('Yes' if yes else 'No')

Solution (Python):
N = int(input())
s = set()

for i in range(26):
    for j in range(15):
        s.add(4*i+7*j)

if N in s:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
a = [0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
if a[n] == 0:
    print("No")
else:
    print("Yes")

Solution (Python):
N = int(input())

r = N // 7

for i in range(r+1):
    if (N - 7*i) % 4 == 0:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
N = int(input())

f = False
for n in range(25 + 1):
    t = N - 4 * n
    f |= t >= 0 and t % 7 == 0

print('Yes' if f else 'No')

Solution (Python):
n=int(input())
l=[4*i+7*j for i in range(25) for j in range(25) if 4*i+7*j<=100 and (i!=0 or j!=0)]
if n in l:
  print("Yes")
else:
  print("No")

Solution (Python):

n = int(input())

s4s = [4 * i for i in range(26)]
s7s = [7 * i for i in range(15)]

for s4 in s4s:
    for s7 in s7s:
        if s4 + s7 == n:
            print('Yes')
            exit()
else:
    print('No')

Solution (Python):
N = int(input())

x = 0

while (N - 7*x) >= 0:
    if (N - 7*x) % 4 == 0:
        print('Yes')
        exit()
    x += 1
print('No')

Solution (Python):
N = int(input())
ans = 'No'
for i in range(N // 4 + 1):
    for j in range(N//7 + 1):
        if N == 4 * i + 7 * j:
            ans = 'Yes'
print(ans)

Solution (Python):
a=int(raw_input())

flag=0
for i in range(30):
    for k in range(20):
        if i*4+k*7==a:
            flag=1

if flag==1:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
k = n // 7

for i in range(k+1) :
    rest = n - 7 * i
    if rest % 4 == 0 :
        print('Yes')
        break
else :
    print('No')

Solution (Python):
print('No' if int(input()) in [1, 2, 3, 5, 6, 9, 10, 13, 17] else 'Yes')

Solution (Python):
N = int(input())
 
flag = 1
for i in range(N // 7 + 1):
  if (N - 7 * i) % 4 == 0:
    print("Yes")
    flag = 0
    break
    
if flag:
  print("No")

Solution (Python):
N = int(input())
count = 0

for i in range(N+1):
    if N - 4*i >= 0:
        if (N - 4*i) % 7 == 0:
            print('Yes')
            count = count + 1
            break
        
if count == 0:
    print('No')

Solution (Python):


n = int(input())

res = False
for i in range(30):
    for j in range(20):
        if i * 4 + j * 7 == n:
            res = True

if res == True:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

N = int(input())

for a in range(51):
    for b in range(15):
        if a*4 + b*7 == N:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):
N = int(input())

able_flg = False 

for i in range(N) :
    if (N - i * 4) == 0 or ((N - i * 4) > 0 and  (N - i * 4) % 7 == 0) : 
        able_flg = True
        
print("Yes" if able_flg else "No")

Solution (Python):
def abc105_b():
    n = int(input())
    for i in range(15):
        for j in range(26):
            if n == (i*7+j*4):
                return "Yes"
    return "No"


print(abc105_b())

Solution (Python):
n=int(input())
while(n>=0):
  if n%4==0:
    print('Yes')
    exit()
  else:
    n-=7
print('No')

Solution (Python):
N=int(input())
flag=False
for i in range(25):
    for j in range(13):
        if 4*i+7*j==N:
            flag=True
            break
if flag==True:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
if n in [1, 5, 9, 13, 17, 2, 6, 10, 3]:
    print('No')
else:
    print('Yes')

Solution (Python):
n = int(input())
for f in range(0, n + 1, 4):
    s = 0
    while f + s <= n:
        if f + s == n:
            print("Yes")
            exit(0)
        s += 7
print("No")

Solution (Python):
n=int(input())
p=-4
g="No"
while p<=n:
    p+=4
    if (n-p)%7==0:g="Yes";break
print(g)

Solution (Python):
n = int(input())
for i in range(25):
    for j in range(14):
        if i * 4 + j * 7 == n:
            print('Yes')
            exit(0)
print('No')

Solution (Python):
n = int(input())

l = [1,2,3,5,6,9,10,13,17]

print('No' if n in l else 'Yes')

Solution (Python):
a = []
for i in range(25):
    for j in range(14):
        a.append(4*i+7*j)
n = int(input())
if n in a:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
flg = False
for i in range(n + 1):
    for j in range(n + 1):
        if 4 * i + 7 * j == n:
            flg = True
            break
ans = 'Yes' if flg else 'No'
print(ans)

Solution (Python):
n=int(input())
if(n%4==0):
    print('Yes')
elif(n%7==0):
    print('Yes')
else:
    k=n
    flag=0
    while(n>0):
        n=n-4
        if(n%7==0):
            flag=1
            break
    while(k>0):
        k=k-7
        if(n%4==0):
            flag=1
            break
    if(flag==1):
        print('Yes')
    else:
        print('No')

Solution (Python):
import sys
N=int(input())
for i in range (26):
    for j in range (15):
        cake=i*4
        donuts=j*7
        if N ==cake+donuts:
            print('Yes')
            sys.exit()
print('No')

Solution (Python):
N = int(input())
ok = False

def f(n):
    if n == 0:
        global ok
        ok = True
        return
    elif n < 0:
        return
    
    if ok:
        return
    
    f(n-4)
    f(n-7)

f(N)

if ok:
    print("Yes")
else:
    print("No")

Solution (Python):
n=int(input())

for i in range(25):
    for j in range(25):
        if n==i*4+j*7:
            print("Yes")
            exit()

print("No")

Solution (Python):
n = int(input())
for i in range(0, n + 1, 4):
    j = n - i
    if j >= 0 and j % 7 == 0:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
n=int(input())

k = 0
for i in range(0,26):
    if (n-i*4)>=0:

        if (n-i*4)%7 == 0:
            k = 1
if k == 1:
    print('Yes')
else:
    print('No')

Solution (Python):
N=int(input())
a=N//4
b=N//7

def cal():
    for i in range(a+1):
        for j in range(b+1):
            if i*4+j*7==N: return "Yes"
    return "No"
print(cal())

Solution (Python):
import numpy as np
import math

N = int(input())



DP = []
DP.append(True)

for i in range(1, N+1):
    if (i - 4 >= 0 and DP[i - 4]) or \
       (i - 7 >= 0 and DP[i - 7]):
        DP.append(True)
    else:
        DP.append(False)

if DP[N]:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())

a=['Yes']+['No']*100

for i in range(n+1):
	if i>=4 and a[i-4]=='Yes':
		a[i]='Yes'
	if i>=7 and a[i-7]=='Yes':
		a[i]='Yes'
print(a[n])

Solution (Python):
n = int(input())
flag = False
for i in range(100):
    for j in range(100):
        if i*4+j*7==n:
            flag = True
if(flag) : print("Yes")
else : print("No")

Solution (Python):
n = int(input())
if n <= 3:
    print("No")
elif n == 5 or n == 6 or n == 9:
    print("No")
elif n == 10 or n == 13 or n == 17:
    print("No")
else:
    print("Yes")

Solution (Python):
s=[]
for i in range(26):
    for j in range(15):
        s.append(4*i+7*j)
if int(input()) in s:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())

remain = n%7
remain4s = []
while True:
    remain4 = remain%4
    if remain4 == 0:
        print('Yes')
        break
    else:
        remain += 7
        if remain > n:
            print('No')
            break
    if remain4 in remain4s:
        print('No')
        break
    else:
        remain4s.append(remain4)

Solution (Python):
N = int(input())
cnt_max_4 = N // 4
flag = False
for i_4 in range(cnt_max_4+1):
    money_4 = 4 * i_4
    res_money = N - money_4
    if res_money % 7==0:
        flag = True
        break
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())

ma = n // 4
mb = n // 7
for i in range(ma+1):
    for j in range(mb + 1):
        if n == 4 * i + 7 * j:
            print('Yes')
            exit()
print('No')

Solution (Python):
n=int(input())

def kasi(m):
    for i in range(m//7+1):
        if (m-7*i)%4==0 :
            return "Yes"
    return "No"

print(kasi(n))

Solution (Python):
N = int(input())
for i in range(26):
    if 4*i > N:
        continue
    if (N - 4*i)%7 == 0:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
n = int(input())
if n in [1,2,3,5,6,9,10,13,17]:
    print("No")
else:
    print("Yes")

Solution (Python):
N = int(input())

def f():
  for four in range(0, N//4+1):
    for seven in range (0, N // 7 + 1):
      if 4 * four + seven * 7 == N:
        return 'Yes'
  return 'No'

print(f())

Solution (Python):
n = int(input())
for i in range(25):
    for j in range(15):
        if 4*i + 7*j == n:
            print("Yes")
            exit()
print("No")

Solution (Python):
N=int(input())

if N<4:
    print("No")
    exit()
for i in range (26):
    for j in range(15):
        if N == 4*i + 7*j:
            print("Yes")
            exit()
print("No")

Solution (Python):
n=int(input())
for i4 in range(25):
    for i7 in range(15):
        if i4*4+i7*7==n:
            print("Yes")
            import sys
            sys.exit()
print("No")

Solution (Python):
n = int(input())

for i in range(30):
    for j in range(20):
        if(i*4 + j*7 == n):
            print("Yes")
            exit()

print("No")

Solution (Python):
N = int(input())

def solve(N):
    for i in range(0, N + 1, 4):
        j = N - i
        if j % 7 == 0:
            return True
    return False

if solve(N):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
ans = 0
for i in range(26):
    for j in range(20):
        if i*4 + j*7 == n:
            ans = 1
            break
if ans == 0:
    print("No")
else:
    print("Yes")