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())
cake=[1,2,3,5,6,9,10,13,17]
if cake.count(N) == 0:
	print("Yes")
else:
	print("No")

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

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

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

c = 0
f = 25
s = 14
flag = "No"

for i in range(1,f):
  c = N - (i * 4)
  for j in range(1,s):
    if c >= 0 and c % (7 * j) == 0 and c >= 7 * j:
      flag = "Yes"
    
if N % 4 == 0 or N % 7 == 0:
  flag = "Yes"
  
print(flag)

Solution (Python):

import sys

N = int(input())
F = int(N/7)
F *= 7

if N % 7 == 0:
    print('Yes')
    sys.exit()
if N % 4 == 0:
    print('Yes')
    sys.exit()

while F-7 >= 0:
    if (N-F) % 4 == 0:
        print('Yes')
        sys.exit()
    else:
        F -= 7
print('No')

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

if n < 4:
    print('No')
    exit()
elif n % 7 == 0 or n % 4 == 0:
    print('Yes')
    exit()
elif n % 7 % 4 == 0 or n % 4 % 7 == 0:
    print('Yes')
    exit()
else:
    for i in range(1, n % 7):
        tmp = n - 7 * i
        if tmp < 0:
            break
        elif tmp % 4 == 0:
            print('Yes')
            exit()
    for i in range(1, n & 4):
        tmp = n - 4 * i
        if tmp < 0:
            break
        elif tmp % 7 == 0:                                                                                      
            print('Yes')
            exit()

print('No')

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

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

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

i = N // 7
ans = "No"
while(i>=0):
  if((N-7*i)%4 == 0):
    ans = "Yes"
    break
  else:
    i = i - 1

print(ans)

Solution (Python):
N = int(input())
ans = 'No'

if ((N%7)==0):
    ans = 'Yes'

if ((N%4)==0):
    ans = 'Yes'

if (ans == 'No'):
    while(N > 6):
        N = N - 7
        if ((N%4) == 0):
            ans = 'Yes'
print(ans)

Solution (Python):
N=int(input())
if (N%4==0)or(N%7==0)or( (N%4==3)and(N!=3) )or( (N%7)==4 )or((N%4==2)and(N!=2)and(N!=6)and(N!=10)):
    print('Yes')
else:
    print('No')

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

if N%4 == 0:
    print("Yes")

if N%4 == 1:
    if N < 21:
        print("No")
    else:
        print("Yes")

if N%4 == 2:
    if N < 14:
        print("No")
    else:
        print("Yes")


if N%4 == 3:
    if N < 7:
        print("No")
    else:
        print("Yes")

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

for x in range(26):
    for y in range(16):
        if 4*x+7*y == n:
            print('Yes')
            sys.exit(0)
print('No')

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

X = N // 7
i = 0
while i <= X:
    Y = N - 7 * i
    Z = Y % 4
    if Z == 0:
        print("Yes")
        break
    i += 1
else:
    print("No")

Solution (Python):
N = int(input())
q = 0
flug = 0
while q <= N :
	if N%7 == 0:
		flug = 1
		break
	
	if (N-q)%4 == 0:
		flug = 1
		break
	q = q + 7
 
if flug == 1:
	print("Yes")
else:
	print("No")

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

    for i in range(26):
        for j in range(19):
            if i*4 + j*7 == N:
                print('Yes')
                return

    print('No')
    return


if __name__ == '__main__':
    main()

Solution (Python):

N = int(input())

ans = "No"

x = 0
y = 0

while N >= 4 * x:
    y= 0
    while N >= (4 * x) + (7 * y):
        if N == (4 * x) + (7 * y):
            ans = "Yes"
            break

        y += 1

    if ans == "Yes":
        break
    
    x += 1



print(ans)

Solution (Python):
def solve(n):
    i = 0
    while i * 7 <= n:
        j = 0
        while 1:
            cnt = i * 7 + j * 4
            if cnt == n:
                return True
            elif cnt > n:
                break
            j += 1
        i += 1
    return False

if solve(int(input())):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
flag = False
for i in range(30):
  sum = n-4*i
  if sum>=0 and sum%7==0:
    flag = True
    break
print('Yes' if flag else 'No')

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

Solution (Python):
n = int(input())
flag = 'No'
if n%4==0:
    flag='Yes'
i=0
while n-4*i>0:
    if (n-4*i)%7==0:
        flag='Yes'
    i += 1

print(flag)

Solution (Python):
N = int(raw_input())
while True:
    if N % 4 == 0:
        print "Yes"
        break
    if N % 7 == 0:
        print "Yes"
        break
    if N < 0:
        print "No"
        break
    N = N - 4

Solution (Python):

N = int(input())
def b(N):
    a = False
    for x1 in range(N//4+1):
        cake = x1*4

        if (N-cake) % 7 == 0:
            a = True
        else:
            pass
    if a:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    b(N)

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

flag = False
if N % 4 % 7 == 0 or N % 7 % 4 == 0 or N % 11 == 0:
    flag = True
else:
    value = N // 7

    for l in range(1, value+1):
        if (N - 7 * l) % 4 == 0:
            flag = True
            break

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

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

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

print(validate(N))

Solution (Python):
n=int(input())
a=0
b=0
flag=0
while a<=n and flag==0:
    b=0
    while b<=(n-a):
        if b+a==n:
            print("Yes")
            flag=1
            break
        b=b+7
    a=a+4
    
if flag==0:
    print("No")

Solution (Python):

n=raw_input()
ina=int(n)
des=0
for x in range(26):
    for y in range(16):
        ans=4*x+7*y
        if ans==ina:
            des=des+1
if des>0:
    print "Yes"
else:
    print"No"

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

Solution (Python):


n = int(input())

max_donut = int(n/7)+1
judge = False
for i in range(max_donut):
    if (n-i*7)%4 == 0:
        judge = True

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

Solution (Python):
n = int(input())
x = 1+n//4
q = ['No','Yes']
s = 0
for a in range(x):
  if (n-a*4)%7==0:
    s += 1
    break
        
print(q[s])

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

flag = 'No'

for i in range(n//7+1):
    if (n-(i)*7)%4 == 0:
        flag = 'Yes'

print(flag)

Solution (Python):
N = int(input())
num = 0
ans = False
while(True):
    if (N - num*4) % 7 == 0:
        ans = True
        break
    else:
        if N < num * 4:
            break
    num+=1
if ans:
    print("Yes")
else:
    print("No")

Solution (Python):
import math
import sys
a = int(input())

b = math.ceil(a/7)
c = math.floor(a/4)

for i in range(b,c+1):
    x = 7*i-a
    y = a-4*i
    if x%3==0 and y%3==0:
        print("Yes")
        sys.exit()
print("No")

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

ans = "No"

for i in range(0, 25):
    for j in range(0, 25):
        if (4 * i + 7 * j == n):
            ans = "Yes"

print(ans)

Solution (Python):
N = int(input())
check = False
if N % 4 == 0 or N % 7 == 0:
    check = True
else:
    for i in range(25):
        for j in range(25):
            if 4 * (i + 1) + 7 * (j + 1) == N:
                check = True
                break
if check is True:
    print('Yes')
else:
    print('No')

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())

ans = 'No'
tmp = 0
x = 0
y = 0

if N < 4:
    pass
else:
    if N % 7 == 0:
        ans = 'Yes'
    elif N % 4 == 0:
        ans = 'Yes'
    else:
        y = N // 7
        for i in range(y):
            x = 1
            tmp = 4*x + 7*y
            while  tmp < N:
                tmp = 4*x + 7*y
                x += 1
            if tmp == N:
                ans = 'Yes'
                break
            y -= 1
print(ans)

Solution (Python):
n=int(input())
if n%11==0 or n%7==0 or n%4==0:
    print("Yes")
else:
    i=1
    flag=0
    m=1
    while n>0 and m>0:
        m=n-(7*i)
        t=n-m
        
        if m>0 and n>0 and (t%7==0 or t%4==0 or t%11==0) and (m%4==0 or m%7==0 or m%11==0):
            
            flag=1
            break
        i+=1
    if flag==1:
        print("Yes")
    else:
        print("No")

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

Solution (Python):
[n]=[int(x) for x in input().split()]

ok=0
for i in range(100):
  for j in range(100):
  
    if i*4+j*7==n: ok +=1
print("Yes" if ok >0 else "No")

Solution (Python):
N = int(input())
flag = False
for i4 in range(30):
    for i7 in range(20):
        if (i4*4)+(i7*7)==N:
            flag = True
            break
print("Yes" if flag else "No")

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

flg = False

for i in range(26):
  t = n - i*4
  if(t < 0):
    break
  elif(t == 0):
    flg = True
    break
  else:
    if(t % 7 == 0):
      flg = True
      break

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

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

A=0

for i in range(N):
    for k in range(N):
        if 4*i+7*k==N:
            print("Yes")
            break
        else:
            pass
    if 4*i+7*k==N:
        break
    else:
        pass
    
else:
    print("No")

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

Solution (Python):
import sys

N = int(input())

for cake in range(25):
    for donatu in range(14):
        if N == 4 * cake +  7 * donatu:
            print("Yes")
            sys.exit()
print("No")

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

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

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

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

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

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

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

Solution (Python):
N = int(input())
import numpy as np
a = np.empty((26,15))
for i in range(26):
  for j in range(15):
    a[i][j] = 4 * i + 7 * j

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

Solution (Python):
import math

n = input()
n = int(n)

cake = 4
donut = 7

for i in range(math.floor(n/donut)+1):
    if(n - donut * i) % cake == 0:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
def slv(n):
    l1=list(range(0,26))
    l2=list(range(0,16))
    for i in l1:
        for j in l2:
            if(i*4+j*7 == n):
                return "Yes"
    return "No"
n = int(input())
print(slv(n))

Solution (Python):
def cal_ans(num):
    for num1 in range(25):
        for num2 in range(15):
            if num1 * 4 + num2 * 7 == num:
                return "Yes"
    return "No"


if __name__ == '__main__':
    N = int(input())
    print(cal_ans(N))

Solution (Python):
n=int(input())
if n<4 :
    print("No")
elif n in {5, 6, 9, 10, 13, 17, 23}:
    print("No")
else :
    print("Yes")

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

k = 0
T = False

while N-(k*7)>0:
    if (N-(k*7))%4 == 0:
        T = True
        break
    k += 1

if N-(k*7)==0:
    T = True

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

Solution (Python):
import sys
N = int(input())
for i in range(int(N/4) + 1):
    amount = i * 4
    for j in range(int(N/7) + 1):
        if(j == 0):
            pass
        else:
            amount += 7
        if(amount == N):
            print('Yes')
            sys.exit()
print('No')

Solution (Python):
n = int(input())
array = []
for i in range(0, 101, 4):
    for j in range(0, 101, 7):
        array.append(i)
        array.append(i+j)
if n in array:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
if __name__ == '__main__':
    N = int(input())

    r = 'No'

    for i in range(20):
        for j in range(20):
            if 4 * i + 7 * j == N:
                r = 'Yes'
                break

    print(r)

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

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

Solution (Python):
flag= True
N = int(input())
for i in range(0,26):
    if (N-4*i) % 7==0:
        flag=False
        break
    elif (N-4*i)<0:
        break
if flag==True:
    print("No")
else:
    print("Yes")

Solution (Python):
n = input()
n = int(n)
if n >= 20 or n % 7==0 or n%4==0 or n == 19 or n == 18 or n == 15 or n == 11:
    print("Yes")
else:
    print("No")

Solution (Python):
obj = {}


def f(n):
    if n in obj:
        return obj[n]
    if n < 4:
        obj[n] = False
        return False
    if n == 4 or n == 7:
        obj[n] = True
        return True
    if f(n - 7):
        obj[n] = True
        return True
    if f(n - 4):
        obj[n] = True
        return True


def main():
    N = int(input())
    if f(N):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = 'No'
if n % 4 == 0:
    ans = 'Yes'
elif n % 7 == 0:
    ans = 'Yes'
else:
    tmp = 4
    while tmp <= n:
        if (n - tmp) % 7 == 0:
            ans = 'Yes'
            break
        else:
            tmp += 4
    if ans != 'Yes':
        tmp = 7
        while tmp <= n:
            if (n - tmp) % 4 == 0:
                ans = 'Yes'
                break
            else:
                tmp += 7

print(ans)

Solution (Python):
import math
money, = list(map(int,input().split()))

max_number = math.ceil(money/4 + 1)

ans = 'No'

for i in range(max_number):
    for j in range(max_number):
        if  money == i*4 + 7*j:
            ans = 'Yes'
            
print(ans)

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

Solution (Python):
def main():
    n = int(input())
    maxCakes = n // 4
    maxDonuts = n // 7
    res = 'No'
    for c in range(maxCakes+1):
        for d in range(maxDonuts+1):
            if 4*c + 7*d == n:
                res = 'Yes'
    print(res)

if __name__ == "__main__":
    main()

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

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

ans = "No"

for i in range(0,25):
    for j in range(0,20):
        if 4*i + 7*j == N:
            ans = "Yes"

print(ans)

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

check=0
if n<4:
    check=1
    print('No')
elif n%4==0 or n%7==0:
    check=1
    print('Yes')
else:
    while n>7:
        n-=7
        if n%4==0:
            check=1
            print('Yes')
            break

if check==0:
    print('No')

Solution (Python):
N = int(input())
if 1 <= N <= 100:
    for i in range(0,25):
        for v in range(0,14):
            if (4 * i) + (7 * v) == N:
                print('Yes')
                break
        if (4 * i) + (7 * v) == N:
            break
    else:
        print('No')
else:
    print('No')

Solution (Python):

Sum = int(input())

r = 0
for i in range(26):
    for k in range(15):
        if 4*i+7*k == Sum:
            r = r +1
        else:
            r = r
if r > 0:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

N = int(input())

if N == 4:
	print('Yes')
	sys.exit()
p = N//7
q = N%7
if p < 1:
	print('No')
	sys.exit()
for i in range(p):
	if q % 4 == 0:
		print('Yes')
		sys.exit()
	else:
		q = (q+7)%4
		if q == 0:
			print('Yes')
			sys.exit()
print('No')

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

l = []

for i in range(0,26):
    t = 4*i
    l.append(t)
    for j in range(0,15):
        t = t  + 7*j
        if t > 100:
            continue
        l.append(t)
    if t > 100:
        continue

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

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

res = 0

for x in range(26):
    if res == 1:
        break
    for y in range(15):
        if n == 4*x + 7*y:
            res = 1
            break

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

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

Solution (Python):
import itertools
n = int(input())
a = [0]
b = [0]
for i in range(1, 101):
    if i % 4 == 0:
        a.append(i)
    if i % 7 == 0:
        b.append(i)
arr = list(itertools.product(a, b))
ans = [sum(i) for i in arr]
if n in ans:
    print('Yes')
else:
    print('No')

Solution (Python):


CAKE = 4
DONUT = 7
UPPER_LIMIT = 100
flg = False

n = int(input())

for i in range(UPPER_LIMIT // CAKE + 1):
    if CAKE * i > n:
        break
    
    if (n - CAKE * i) % 7 == 0:
        flg = True
        break

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

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

ttt = False 
for k in range(int(n/7)+1):
    if (n - 7*k) % 4 == 0:
        ttt = True
if ttt:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
cou = 0
if n < 4:
  print("No")
  exit()
while 1:
  if n % 7 == 0:
    print("Yes")
    exit()
  n -= 4
  if n < 0:
    print("No")
    exit()

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

if N % 4 == 0:
    print("Yes")
    exit()
elif N % 7 == 0 :
    print("Yes")
    exit()





for i in range(1, (N // 7) + 1):
    div = 7 * i
    ret = N -  div 
    if ret % 4 == 0:
        print("Yes")
        exit()
print("No")

Solution (Python):
import numpy as np
a = int(input())
if(a > 7):
	c = np.zeros(a)
	for i in range(7):
		if(i == 3 or i == 6):
			c[i] = 1
	
	for i in range(7, c.shape[0]):
		if(c[i-4] == 1 or c[i-7] == 1):
			c[i] = 1
	if(c[-1] == 1):
		print("Yes")
	else:
		print("No")
else:
	if(a == 4 or a == 7):
		print("Yes")
	else:
		print("No")

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

Solution (Python):
a = int(input())
i = 0
f = 0
while i*4 <= a:
    if (a - (4*i))%7 == 0:
        f = 1
        break
    i += 1
if f == 1:
    print("Yes")
else:
    print("No")

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

flag = False

for i in range(0, 30):
    for j in range(0, 20):
        if 4 * i + 7 * j == n:
            flag = True
            break
    if flag:
        break

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

Solution (Python):

N = int(input())
if (N % 7 == 0) or (N % 7 == 4):
  print('Yes')
  exit()
a = int(N / 7)
for i in range(a+1):
  N_ = N - 7 * i
  if N_ % 4 == 0:
    print('Yes')
    exit()
print('No')

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())

for x in range(int(100/7)):
    for y in range(int(100/4)):
        if (n == 7*x + 4*y):
            print('Yes')
            exit(0)
print('No')
exit(0)

Solution (Python):
N = int(input())
L = [1,2,3,5,6,9,10,13,17]

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

Solution (Python):

n = int(raw_input())
flag1 = 0
flag2 = 0

if n % 4 == 0 or n % 7 == 0:
    print("Yes")
    exit()

for i in range(n / 4):
    if (n - i * 4) % 7 == 0:
        flag1 = 1

for i in range(n / 7):
    if (n - i * 7) % 4 == 0:
        flag2 = 1

if flag1 == 1 or flag2 == 1:
    print("Yes")
else:
    print("No")

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

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

Y="Yes"
ans="No"

if N<4:
	print(ans)
	exit(0)

if (N % 4 ==0)or(N % 7 ==0):
	print(Y)
	exit(0)

if ((N % 7) % 4)==0:
	print(Y)
	exit(0)

if ((N % 4) % 7)==0:
	print(Y)
	exit(0)


for i in range(16):
	a = N - (7*i)
	if a<4: continue
	
	if a%4==0:
		ans=Y
		break


print(ans)

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

flag = False
for i in range(26):
    for j in range(15):
        if (4*i + 7*j == N):
            flag = True

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

Solution (Python):
N = int(input())
a = [4 * i for i in range(26)]
b = [7 * i for i in range(15)]

for i in a:
    for j in b:
        if i + j == N:
            print('Yes')
            exit()
print('No')

Solution (Python):
n = int(input())
a = 0
if n % 4 == 0 or n % 7 == 0:
    print("Yes")
else:
    for i in range(n//4):
        n -= 4
        if n % 7 == 0:
            print("Yes")
            exit()
    print("No")

Solution (Python):
def main():
    n = int(input().strip())

    for i in range(100//4+1):
        m = i * 4
        if n < m:
            break
        for j in range(0, n//7+1):
            
            m = i * 4 + j * 7
            if n == m:
                print('Yes')
                return
            if n < m:
                break


    print('No')

if __name__ == '__main__':
    main()

Solution (Python):


a = int(input())


ans = "No"
for i in range(a//4 + 1):
    for j in range(a//7 + 1):
        if i*4 + j*7 == a:
            ans = "Yes"
            break
    else:
        continue
    break


print(ans)

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

if n % 4 == 0 or n % 7 == 0:
    print('Yes')
    exit()

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

print('No')

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

flag = False
for ic in range(N//4+1):
    for id in range(N//7+1):
        if ic*4+id*7 == N:
            flag = True
            break
    if flag:
        break

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

Solution (Python):


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

    if (n / 4 >= 1 and n % 4 in [0, 3]) or n / 7 >= 1 and n % 7 in [0, 1, 5]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
if __name__ == '__main__':
    n = input()
    a = 0
    b = 0
    while(a < 15):
        b = 0
        while(b < 26):
            if(7 * a + 4 * b == n):
                print 'Yes'
                quit()
            b += 1
        a += 1
    print 'No'

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

Solution (Python):
import sys
N = int(sys.stdin.readline())

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

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

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

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

Solution (Python):
n = int(input())
ok = False
for i in range(26):
	if (n - 4 * i) % 7 == 0 and (n - 4 * i) // 7 >= 0:
		ok = True

if ok:
	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, stdout

input = lambda: stdin.readline().rstrip()
write = stdout.write

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

    cake = 0
    dounut = 0
    while 1:
        dollars = N - cake * 4
        if dollars < 0:
            print('No')
            break
        elif not dollars % 7:
            print('Yes')
            break
        cake += 1

main()

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

flag = False

for i in range(14+1):
    for j in range(25+1):
        if N == (7*i + 4*j):
            if flag == False:
                print('Yes')
                flag = True
            break

if flag == False:
    print('No')

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

num_list=[]

for i in range(0,26):
  for j in range(0,14):
    num_list.append(i*4+j*7)


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

Solution (Python):
def main():
    string = int(input())
    non = {1,2,3,5,6,9,10,13,17}
    num = {string}
    if non & num:
        print("No")
    else:
        print("Yes")



if __name__ == "__main__":
    main()

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

maximum = int(N / 7) + 1
res = 'No'
i = 0
while i < maximum:
    if(int(N - i * 7) % 4 == 0):
        res = 'Yes'
    i = i + 1
print(res)

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())

m = 100
d4 = int(m / 4)
d7 = int(m / 7)

ys = set()
for i in range(0, d4 + 1):
    for j in range(0, d7 + 1):
        y = 4 * i + 7 * j
        if y > 100:
            continue
        ys.add(y)

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

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

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

for i in range(26):
  rest = n - 4*i
  if rest < 0:
    print("No")
    break
  if rest%7 == 0:
    print("Yes")
    break
else:
  print("No")

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

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

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

ans = 'No'
for c in range(100):
    for d in range(100):
        if 4*c + 7*d == N:
            ans = 'Yes'
print(ans)

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

Solution (Python):
n = int(input())
n4 = [i*4 for i in range(26)]
n7 = [i*7 for i in range(15)]
ans = 0
for i in n4:
    if n-i in n7:
        ans = 1
print("Yes" if ans == 1 else "No")

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

max7=N//7
max4=N//4
bool_N=False

for i in range(max7+1):
    for j in range(max4+1):
        if 7*i+4*j==N:
            bool_N=True

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

Solution (Python):


def inpl(): return list(map(int, input().split()))


n = int(input())
ans = 'No'

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

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

b=int(a/7)
c=int(a/4)
k=0

for i in range(b+1):
    for j in range(c+1):
        if 7*i+4*j==a:
            k=1
if k==1:
    print("Yes")
else:
    print("No")

Solution (Python):


N = int(input())

if N%4==0 or N%7==0:
    print("Yes")
    exit()


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

Solution (Python):
n = int(input())
for i in range(0,101,4):
  for j in range(0,101,7):
    if (i + j) > 100:
      break
    if n == (i + j):
      print('Yes')
      quit()
print('No')

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

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

flg = False
neg, i = 0, 0
while neg < n:
    neg = i * 4
    if (n - neg) % 7 == 0:
        flg = True

    i += 1

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

Solution (Python):


N = int(input())

V_max = N // 4
V_min = N // 7

if N % 4 == 0 or N % 7 == 0:
    print('Yes')
    exit()

tmp = N
for i in range(1,V_max):
    tmp = N - i*4
    if tmp % 7 == 0:
        print('Yes')
        exit()

print('No')

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

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

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

def calc(x, y):
    return 4 * x + 7 * y

max4 = N // 4 + 2
max7 = N // 7 + 2

re = 'No'
for i in range(max4):
    for j in range(max7):
        if calc(i, j) == N:
            re = 'Yes'
            break
            
print(re)

Solution (Python):
c = 4 * 7
n = int(input())
if n == c:
    print("Yes")
    exit()
m = n % c
i = n
while 0 < i:
    j = i
    while 0 < j:
        j -= 7
        if j == 0:
            print("Yes")
            exit()
    i -= 4
    if i == 0:
        print("Yes")
        exit()
print("No")

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

ans = "No"

for i in range(30):
    for j in range(20):
        price = i * 4 + j * 7

        if price == N:
            ans = "Yes"

print(ans)

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

flag = 0
for i in range(26):
    if (N - i * 4) >= 0:
        if (N - i * 4) % 7 == 0:
            flag = 1

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

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

if __name__ == "__main__":
    n = int(input())
    print(solve(n))

Solution (Python):
N = int(input())
c4 = 0
judge = "No"

while c4*4 <= N:
    M = N - c4*4
    if M % 7 == 0:
        judge = "Yes"
    c4 += 1

print(judge)

Solution (Python):
import sys

n = int(input())

while n >= 4:
  if n % 4 == 0:
    print('Yes')
    sys.exit()
  else:
    n -= 7

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

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