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):
import sys


CAKE = 4
DOUNAT = 7


def check_amount(i, j, n):
    return i*4 + j*7 == n


n = int(input())
count = 0
for i in range(int(n/CAKE+1)):
    for j in range(int(n/DOUNAT+1)):
        if check_amount(i, j, n):
            print('Yes')
            sys.exit()
print('No')

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

CAKE = 4
DONUTS = 7

ans = "No"
for i in range(N//CAKE + 1):
  for j in range(N//DONUTS + 1):
    total = CAKE*i + DONUTS*j
    if total == N:
      ans = "Yes"
      break

print(ans)

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

cnt=0
if N<4:
    print('No')
    cnt=1
else:
    t=int(N/7)
    for i in range(0,t+1):
        if (N-(7*i))%4==0:
            print('Yes')
            cnt=1
            break
        else:
            pass
    if cnt==0:
        print('No')

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

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

Solution (Python):
N = int(input())
flg = True
for a in range(0,N//4 + 1):
    for b in range(0,N//7 + 1):
        total = 4*a + 7*b
        if total == N:
            flg = False
            break
if(flg):
    print('No')
else:
    print('Yes')

Solution (Python):
N = int(input())
res = 0
for a in range (0,N//4 + 1):
    for b in range(0,N//7 + 1):
        total = 4 * a + 7 * b
        if total == N:
            res += 1
if res > 0:
    print('Yes')
else:
    print('No')

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

ans = False
for c in range(101):
    for d in range(101):
        if (4 * c) + (7 * d) == n:
            ans = True
            break

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    flg=0
    for i in range(n//7+1):
        if (n-i*7)%4==0:
            flg=1
    if flg==1:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

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

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

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

max4 = n // 4 + 1
max7 = n // 7 + 1

check = False
for i in range(max4):
    for j in range(max7):
        s = 4 * i + 7 * j
        if s == n:
            check = True
            break

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

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

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

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

for i in range(26):
  for j in range(15):
    if 4*i + 7*j == n:
      print('Yes')
      flag = 1
  if flag == 1:
    break
    
    
if flag == 0:
  print('No')

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

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

a = n // 4
b = n // 7

print("Yes" if any([(n - 4*i) % 7 == 0 for i in range(a+1)] + [(n - 7*i) % 4 == 0 for i in range(b+1)]) else "No")

Solution (Python):
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from functools import *
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def Golf():
    *a,=map(int,open(0))
def S_():
    return input()
def IS():
    return input().split()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'

    mp=[1]*(w+2)
    found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[1]+[mp_def[j] for j in s]+[1]
    mp+=[1]*(w+2)
    return h+2,w+2,mp,found
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['YES','NO']

mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()

input=lambda: sys.stdin.readline().rstrip()
 
def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True

n=I()
t=[0]*102
for i in range(100):
    for j in range(100):
        t[min(101,4*i+7*j)]=1

print(['No','Yes'][t[n]])

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

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

Solution (Python):
import itertools
import sys

N = int(input())
x = range(25 + 1)
y = range(14 + 1)
for i, j in itertools.product(x, y):
  if i * 4 + j * 7 == N:
    print('Yes')
    sys.exit()
else:
  print('No')

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

Solution (Python):
import sys
n = int(input()) 
for i in range(100):
    for j in range(100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):
import sys
n = int(input()) 
i = 0 
j = 0
while(i < 100):
    j = 0
    while(j < 100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()
        j+= 1
        
    i+= 1

print("No")

Solution (Python):
import sys
n = int(input()) 
for i in range(100):
    for j in range(100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):

N=int(input())
flg=False
for i in range(0,N//7+1):
    x=N
    x=x-7*i
    if x%4==0:
        flg=True
        break
print('Yes' if flg else 'No')

Solution (Python):
import math
n = int(input())
for i in range(n):
    for j in range(n):
        if i*4+j*7 == n:
            print("Yes")
            quit()
        if i*4+j*7 >= n:
            break
print("No")

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

Solution (Python):
def check(n):
    for i in range( n // 7 + 1 ):
        for j in range( n // 4 + 1 ):
            if (i*7 + j*4) == n:
                print("Yes")
                return

    print("No")
    return


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

Solution (Python):
n = int(input())
lista = [4*i for i in range((100//4)+1)]
listb = [7*i for i in range((100//7)+1)]
flag = False
for i in lista:
    for j in listb:
        if i+j == n:
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
ans = 0
i = 0
while 4*i <= n:
    j = 0
    while 4*i+7*j <= n:
        if 4*i+7*j == n:
            ans = 1
        j += 1
    i += 1
if ans:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
n = int(input())
for x in range(26):
    for y in range(15):
        if 4*x + 7*y == n:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):
n = int(input())
cnt = 0
for k in range(n):
    for j in range(n):
        if 4*k+7*j == n:
            cnt += 1
if n < 4 or cnt == 0:
    print("No")
else:
    print("Yes")

Solution (Python):
N=int(input())
ans = "No"
for i in range(26):
  for j in range(15):
    if (i*4 + j*7) == N:
      ans = "Yes"
      break
print(ans)

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

for i in range(N//4 +1) :
    for j in range(N//7 +1) :
        cost = 4*i + 7*j
        if cost == N :
            print("Yes")
            exit()

print("No")

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    n = int(input())
    ans = "No"
    for i in range((n // 4) + 1):
        for j in range((n // 7) + 1):
            if 4 * i + 7 * j == n:
                ans = "Yes"
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
a=0
for i in range((n//4)+1):
    for j in range((n//7)+1):
        if 4*i+7*j==n:
            a+=1
if a!=0:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
c = (N + (4 - N%4)) / 4
d = (N + (7 - N%7)) / 7
flag = False
 
for i in range(int(c)):
  for j in range(int(d)):
    total = 4*i + 7*j
    if total == N:
      flag = True
      
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
N=int(input())
ans = "No"
for i in range(26):
  for j in range(15):
    if (i*4 + j*7) == N:
      ans = "Yes"
      break
print(ans)

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

if cnt == N//4 + 1:
    print('No')

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

for i in range(100):
    for j in range(100):
        if 4 * i + 7 * j == N:
            ans = True
    
print('Yes' if ans else 'No')

Solution (Python):
n = int(input())
if n %4 == 0:
	print ("Yes")
	exit()
if n % 7 == 0:
	print ("Yes")
	exit()

while n >= 0:
	n -= 4
	if n%7 == 0:
		print ("Yes")
		exit()
print("No")

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

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

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

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

for x in range(35):
	if (n - 7*x) % 4 == 0 and n >= 7*x:
		print("Yes")
		break
else:
	print("No")

Solution (Python):




def main():
    N = int(input())
    reslut = 'No'
    for i in range(N // 4 + 1):
        for j in range(N // 7 + 1):
            if N == i * 4 + j * 7:
                reslut = 'Yes'
    print(reslut)


if __name__ == "__main__":
    main()

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

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

for i in range (math.ceil((n+1) / 4) ):
  for j in range (math.ceil((n+1) / 7) ):
    
    if i*4 + j*7 == n:
      counter = True
if counter == True:
  print("Yes")
else:
  print("No")

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

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

flag = 0

for i in range(26):
    for j in range(16):
      if i*4+j*7 == N:
        flag = 1

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

Solution (Python):
try:
  N = int(input())
  for a in range(100):
      for b in range(100-a):
          if 4*a+7*b==N:
              print('Yes')
              exit()
  print('No')
except EOFError:
  pass

Solution (Python):
n = int(input())
max_c = (n+4-1)//4
max_d = (n+7-1)//7
fl = 0
for i in range(max_c + 1):
    for j in range(max_d + 1):
        if n == 4*i + 7*j:
            fl = 1
            break
    if fl == 1:
        break
print('Yes') if fl == 1 else print('No')

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

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

max_a_loop , _ = divmod(N, a)
max_b_loop , _ = divmod(N, b)


total = 0
ans = "No"

for i in range(max_a_loop+1):
    total = a*i


    if total == N:
        ans = "Yes"
    for j in range(max_b_loop+1):
        total += b*j


        if total == N:
            ans = "Yes"
print(ans)

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

max_a_loop , _ = divmod(N, a)
max_b_loop , _ = divmod(N, b)


total = 0
ans = "No"

for i in range(max_a_loop+1):
    total = a*i


    if total == N:
        ans = "Yes"
    for j in range(max_b_loop+1):
        total += b*j


        if total == N:
            ans = "Yes"
print(ans)

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

flag = 0
for i in range(25):
    for j in range(12):
        if (4*i + 7*j) == N:
            flag = 1
        else:
            flag = flag

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

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

Solution (Python):
def main():
    limit = int(input())
    result = False
    for i in range(26):
        for j in range(15):
            if 4 * i + 7 * j == limit:
                result = True
                break
    if result:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

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

dp = [0] * (n + 1)
dp[0] = 1
for i in range(n):
  if n >= i + 4 and dp[i] >= 1:
    dp[i + 4] = 1
  if n >= i + 7 and dp[i] >= 1:
    dp[i + 7] = 1

if dp[n] == 0:
  print("No")
else:
  print("Yes")

Solution (Python):
def resolve():
    n = int(input())
    l = list()
    for i in range(26):
        for j in range(16):
            l.append(i*4 + j*7)

    if n in l:
        print("Yes")
    else:
        print("No")

resolve()

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

n=100
f=0

for i in range(n):
    for j in range(n):
        if 4*i+7*j==N:
            f=1
            break
            
if f==1:
    print("Yes")
else:
    print("No")

Solution (Python):
n =int(input())
a=int(n/4)+1
b=int(n/7)+1

total=0
count=0
for i in range(a):
    for j in range(b):
            total=4*i+7*j
            if total==n:
                count+=1
                
if count>=1:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
N=int(input())
if N%4==0 or N%7==0:
  print('Yes')
else:
  while 7<N:
    N-=7
    if N%4==0:
      print('Yes')
      break
  else:
    print('No')

Solution (Python):
n = int(input())
for a in range(n//4+1):
  for b in range(n//7+1):
    if n == 4*a+7*b:
      print('Yes')
      exit()
print('No')

Solution (Python):
cake = 4
donaut = 7
N = int(input())
count = 0

for i in range(0, 20):
	for k in range(0, 20):
		if N == cake * i + donaut * k:
			count = 1
			break

if count == 0:
	print('No')
else:
	print('Yes')

Solution (Python):
import sys
n = int(input())
cake = 0
for i in range(n//4 + 1):
    don = 0
    for j in range(n//7 + 1):
        
        if cake + don == n:
            print("Yes")
            sys.exit()
        don += 7
    cake += 4
print("No")

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

combi = False
for i in range(N//4+1):
    if (N - 4 * i) % 7 == 0:
        combi = True
if combi:
    print('Yes')
else:
    print('No')

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

no_flag = True

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

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

combi = []

for i in range(26): 
    for j in range(16): 
        combi.append((4 * i) + (7 * j))
       
if N in combi:
    print('Yes')
else :
    print('No')

Solution (Python):
n = int(input())
a = 0
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i + 7*j == n:
            a += 1
            break
    else:
        continue
else:
    if a >= 1:
        print('Yes')
    else:
        print('No')

Solution (Python):
n = int(input())
price = []
for i in range(26):
  for j in range(16):
    price.append(i*4+j*7)
if n in price:
  print('Yes')
else:
  print('No')

Solution (Python):
n=int(input())
c=False
i=0
while(i<(n//4+1)):
  if (n-4*i)%7==0:
    print("Yes")
    exit()
  else:
    i+=1
print("No")

Solution (Python):
N = int(input())
for f in range(0,26):
    for s in range(0,15):
        if (4*f)+(7*s)==N:
            print('Yes')
            break
        elif (f==25) and (s==14):
            print('No')
    else:
        continue
    break

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

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

for i in range(0, 26):
    for j in range(0, 16):
        if(4*i+7*j==n):
            flg = True
            break
print("Yes" if flg else "No")

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

while N >= 0:
    if N % 4 == 0:
        print("Yes")
        exit()
    N -= 7
print("No")

Solution (Python):
N = int(input())
sum=0
count=0
for a in range(26):
    for b in range(15):
        sum = 4*a + 7*b
        if N == sum:
            count+=1
if count>0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(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')

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

for cake in range(27):
    for donut in range(16):
        val = cake * 4 + donut * 7
        if val == n:
            print('Yes')
            exit()

print('No')

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

cake = N//4
donuts = N//7
for i in range(cake+1):
    for j in range(donuts+1):
        if (4*i+7*j) == N:
            print("Yes")
            exit()
print("No")

Solution (Python):
import itertools
import sys

"""
1個4ドルのケーキX個と1個7ドルのドーナツY個
合計Nドルとなる買い方があるときはyes、逆はno

1<= N <=100
4 * X + 7 * Y = N
0<= X <= 25, 0<= Y <= 14
"""

N = int(input())
X = list(range(26))
Y = list(range(15))

for i, j in list(itertools.product(X, Y)):
  if 4 * i + 7 * j == N:
    print('Yes')
    sys.exit()
print('No')

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

flag=False

while(n>0):
    if n%7==0:
        flag=True
        break
    n-=4
    if n==0:
        flag=True

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

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

print('No')

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

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

Solution (Python):
print("Yes" if [4*x+7*y for y in range(101) for x in range(101)].count(int(input())) else "No")

Solution (Python):
n=int(input())
ans="No"
a=0

for i in range(15):
  for j in range(26):
    a=7*i+4*j
    if a==n:
      ans="Yes"
      break
print(ans)

Solution (Python):

n = int(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')

Solution (Python):
n=int(input())
ans="No"
a=0

for i in range(15):
  for j in range(26):
    a=7*i+4*j
    if a==n:
      ans="Yes"
      break
print(ans)

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

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

Solution (Python):

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
ans = 0
for i in range(n//7+1):
    if (n - i*7) % 4 == 0: ans += 1
print("Yes" if ans > 0 else "No")

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

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

for i in range (math.ceil((n+1) / 4) ):
  for j in range (math.ceil((n+1) / 7) ):
    
    if i*4 + j*7 == n:
      counter = True
if counter == True:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
cnt = 0
for i in range(100+1):
    if 4*i>N:
        break
    for j in range(100+1):
        if 7*j>N:
            break
        if 4*i+7*j==N:
            cnt += 1

if cnt>0:
    print('Yes')
else:
    print('No')

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

counter = 0
max = int(n/4) + 1
for i in range(max):
  for ii in range(max):
    if(n == i*7 + ii*4):
      counter = counter +1

if(counter >= 1):
  print("Yes")
else:
  print("No")

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

counter = 0
max = 25
for i in range(max):
  for ii in range(max):
    if(n == i*7 + ii*4):
      counter = counter +1

if(counter >= 1):
  print("Yes")
else:
  print("No")

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

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

c = 0

ans = 'No'

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

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

Solution (Python):
a=int(input())
print("Yes" if [4*x+7*y for x in range(101) for y in range(101)].count(a) else "No")

Solution (Python):
n=int(input())
print("Yes" if [4*x+7*y for y in range(101) for x in range(101)].count(n) else "No")

Solution (Python):
N = int(input())
x = 0
flg = 0

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

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

Solution (Python):
import heapq

N = int(input())
h = [4, 7]
heapq.heapify(h)

while True:
    n = heapq.heappop(h)

    if n > N:
        print('No')
        break

    if n == N:
        print('Yes')
        break

    heapq.heappush(h, n + 4)
    heapq.heappush(h, n + 7)

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

ans =0

for i in range(N):
    for j in range(N):
        if (i*4 + j*7)== N:
            ans +=1
            break
        if(ans==1):
            break
    


if ans !=0:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
n = int(input())
cnt = 0
for i in range(100):
    if 4*i>n:
        break
    for j in range(100):
        if 7*j>n:
            break
        if 4*i+7*j==n:
            cnt+=1
if cnt>0:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
a = 0
for i in range(n+1):
    for j in range(n+1-i):
        if i*4 + j*7 == n:
            a += 1
if a >= 1:
    print("Yes")     
else:
    print("No")

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

Solution (Python):
n = int(input().strip())
for i in range(0, 26, 1):
    cake = 4 * i
    for j in range(0, 16, 1):
        donut = 7 * j
        if cake + donut == n:
            print("Yes")
            exit()
print("No")

Solution (Python):
n = int(input())
max_x = int(n/4) + 1
max_y = int(n/7) + 1
for x in range(max_x + 1):
    for y in range(max_y + 1):
        if (4*x + 7*y) == n:
            print('Yes')
            exit()
print('No')

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

combi = False
for i in range(N//4+1):  
    for j in range(N//7+1):  
        if 4 * i + 7 * j == N:
            combi = True
            break
if combi:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
result = "No"
for i in range(20):
    for j in range(30):
        if j * 4 + i * 7 == N :
            result = "Yes"
            continue
        
print(result)

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())
ans = "No"

for a in range (25):
  for b in range (14):
    if 4*a + 7*b == N:
      ans = "Yes"

print(ans)

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):
def solve(n):
	if n == 0:
		return True
	if n < 0:
		return False
	return (False or solve(n-4) or solve(n-7))

n = int(input())
print('Yes' if solve(n) else 'No')

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

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

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

for i in range(0, int(100/7)+1):
   x = n - i * 7
   if (x == 0 or x % 4 == 0):
      print('Yes')
      exit()
   elif (x < 4):
      break
print('No')

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

Solution (Python):

n = int(input())

flag = 0
for cake in range(100):
    for donuts in range(100):
        if 4 * cake + 7 * donuts == n:
            flag = 1

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

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

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

is_Yes = False
if N % 4 == 0 or N % 7 == 0:
    print('Yes')
else:
    is_Yes = False
    for i in range(4, N+1, 4):
        if (N - i) % 7 == 0:
            is_Yes = True
            break
    if is_Yes:
        print('Yes')
    else:
        print('No')

Solution (Python):
N = int(input())
print("YNeos"[N not in [a+b for a in range(0,N+1,4) for b in range(0,N+1,7)]::2])

Solution (Python):
N = int(input())
if N < 4:
  print("No")
elif N % 4 == 0 or N % 7 == 0 or N % 11 == 0:
  print("Yes")
else:
  ans = "No"
  for _ in range(N // 4):
    if N % 7 == 0:
      ans = "Yes"
      break
    else:
      N -= 4

  print(ans)

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

ans = "No"

while N >= 0:
  if N % 4 == 0:
    ans = "Yes"
    break
  else:
    N = N - 7
    
    
print(ans)

Solution (Python):


N = int(input())

Cake = 4
Donuts = 7

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

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
flag = False
while True:
    if N % 4 == 0 or N == 0:
        flag = True
        break
    if N < 4:
        break
    N -= 7
if flag:
    print("Yes")
else:
    print("No")

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

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

for i in range(n//4+1):
    a=n-i*4
    if a % 7 == 0:
        print("Yes")
        sys.exit()
print("No")

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

ans = 0
for i in range(26):
    for j in range(20):
        if 4*i + 7*j == N:
            ans = 1     

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

Solution (Python):
x = 4
y = 7

a=int(input())

ans = 'No'

for i in range(20):
  for j in range(14):
    if (x * i) + (y * j) == a:
      ans = 'Yes'

print(ans)

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

list_aaa =[]

for i in range(26):
    for j in range(26):
        list_aaa.append((i*4)+(j*7))
list_aaa = sorted(list_aaa)



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

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

l = []

for i in range(0,101,4):
    for j in range(0,101,7):
        l.append(i + j)

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

Solution (Python):
n = int(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")

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

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

Solution (Python):
import sys
bbn=1000000007
	

		
def main():
	a = int(input())
	for i in range(16):
		if 7 * i <= a and (a - (7*i))%4==0:
			return 'Yes'
	return 'No'
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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



for x in range(n):
    memo = n-4*x
    if memo%7 == 0 and memo//7 >= 0:
        print("Yes")
        break
    elif x==n-1:
        print("No")