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())
fin = False
for i in range(0, 26):
    for j in range(0, 15):
        if i*4 + j*7 == n:
            fin = True
if fin:
    print("Yes")
else:
    print("No")

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

f = 0

for i in range(26):
  for j in range(15):
    if 4*i + 7*j == N:
      f = 1
      
      
if f == 1:
  print('Yes')
else:
  print('No')

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

C = N//4
D = N//7
count = 0
for c in range(0,C+1):
    for d in range(0,D+1):
        if (4*c) + (7*d) == N:
            count += 1

if count > 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
from sys import exit
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())
for i in range(0, 1 + N//4):
    for j in range(0, 1 + N//7):
        if (N < 4*i + 7*j): break
        if (4*i + 7*j == N): 
            print('Yes')
            exit()
print('No')

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

Solution (Python):




import sys














def main():
    n = int(sys.stdin.readline().rstrip())
    
    for x in range(n // 7 + 1):
        if (n - 7 * x) % 4 == 0:
            print('Yes')
            exit()
    print('No')


if __name__ == "__main__":
    
    main()

Solution (Python):
x=int(input());print("No" if x<4 or 4<x<7 or 8<x<11 or x==13 or x==17 else "Yes")

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

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

Solution (Python):

N = int(input())
bm = int(N/7)

flag = 0
for b in range(bm + 1):
  if((N-7*b)%4 == 0):
    flag = 1
    break

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

Solution (Python):
n = int(input())
DP = [False]*(n+1)
DP[0] = True
for i in range(n):
    if not DP[i]:
        continue
    for j in [4,7]:
        if i+j<=n:
            DP[i+j] = True
print(["No", "Yes"][DP[-1]])

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

for i in range(100):
    for j in range(100):
        se.add(i*7+j*4)

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

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

cake = n // 4

for i in range(cake + 1):
  cake_money = i * 4
  donut_money = n - cake_money
  if donut_money >= 0 and donut_money % 7 == 0:
    print("Yes")
    break
else:
  print("No")

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

for i in range(25):
    for m in range(14):
        if n == 4*i + 7*m:
            print("Yes")
            sys.exit()
        else:
            continue
print("No")

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

for p in range(25):
    for q in range(15):
            if (N - 4*p - 7*q) == 0:
                ans = "Yes"
                break
                
print(ans)

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

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

ans = 0

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

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

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

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

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

while n >= 0:
    if n % 4 == 0:
        ans = 'Yes'
        break
    n -= 7

print(ans)

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

ans = False
for i in range(0, n + 1, 4):
    for j in range(0, n + 1, 7):
        if i + j == n:
            ans = True

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

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

Solution (Python):
N = int(input())
def func_1(x):
    co = 0
    for i in range(26):
        for j in range(13):
            if 4*i + 7*j == x:
                co += 1
    if co != 0:
        print("Yes")
    else:
        print("No")
func_1(N)

Solution (Python):
N = int(input())
co = 0
for i in range(26):
    for j in range(13):
        if 4*i + 7*j == N:
            co += 1

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

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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


if __name__ == '__main__':
    main()

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

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

for a in range(N//4 + 1):
  for b in range(N//7 + 1):
    if 4*a + 7*b == N:
      print("Yes")
      exit()

print("No")

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

flag = True
for i in range(26):
    for j in range(16):
        if 4 * i + 7 * j == N:
            flag = False
            
if flag == True:
    print("No")
else:
    print("Yes")

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

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

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

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

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

Solution (Python):
N = int(input())
flag = 0
for i in range(0, 101, 7):
    if flag==1:
        break
    for j in range(0, 101, 4):
        if N == i + j:
            flag = 1
            break

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

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

N = int(input())
dp = [0] * (N + 1)
dp[0] = 1
for i in range(N + 1):
  if i + 4 <= N:
    dp[i + 4] += dp[i]
  if i + 7 <= N:
    dp[i + 7] += dp[i]
if dp[-1]:
  print("Yes")
else: print("No")

Solution (Python):
n = int(input())
a = []
for i in range(25):
	a.append((i+1)*4)
b = []
for i in range(14):
	b.append((i+1)*7)
c = []
for i in range(25):
	for j in range(14):
		if(a[i]+b[j] <= 100):
			c.append(a[i]+b[j])
d = []
d.extend(a)
d.extend(b)
d.extend(c)
e = []
e = list(set(d))
e.sort()
if n in e:
	print ("Yes")
else:
	print ("No")

Solution (Python):
N = int(input())
c = list(range(0,int(N/4)+1))
d = list(range(0,int(N/7)+1))
ans = "No"
for i in range(len(c)):
    for j in range(len(d)):
        if N - (4*i + 7*j) == 0:
            ans = "Yes"
            break
print(ans)

Solution (Python):
n = int(input())
j = len([1 for c in range(n//4+1) for d in range(n//7+1) if n-4*c-7*d==0])
print("Yes" if j > 0 else "No")

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

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

A = int(N / 4)
B = int(N / 7)

jug = False

for i in range(0, (A + 1)* 4, 4):
    if jug == True:
        break
    for j in range(0, (B + 1) * 7, 7):
        if i + j == N:
            print("Yes")
            jug = True
            break

if jug == False:
    print("No")

Solution (Python):



import unittest
from io import StringIO
import sys


def input():
    return sys.stdin.readline().rstrip()


def resolve():
    N = int(input())
    C = 4
    D = 7

    for i in range(N//C+1):
        for j in range(N//D+1):
            if i*C + j*D == N:
                print("Yes")
                exit()
    print("No")


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """11"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """40"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """3"""
        output = """No"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

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

Solution (Python):


N = int(input())
maxCake = N//4+1
maxDon = N//7+1
flg =False
for i in range(maxCake):
    for j in range(maxDon):
        if i*4+j*7==N:
            print('Yes')
            flg = True
            break;
    if flg == True:
        break
if flg == False:
    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')
      quit()
print('No')

Solution (Python):

def main():
    N = int(input())
    if N % 4 == 0 or N % 7 == 0:
        print("Yes")
    elif N < 4:
        print("No")
    else:
        while N > 7:
            N -= 4
            if N % 4 == 0 or N % 7 == 0:
                print("Yes")
                return
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):

N = int(input())

cake_price = 4
donut_price = 7

max_cake = N // cake_price
max_donut = N // donut_price

isJustN = False
if max_cake * cake_price == N or max_donut * donut_price == N:
    isJustN = True
else:
    for c in range(1, max_cake + 1):
        for d in range(1, max_donut + 1):
            total_price = cake_price * c + donut_price * d
            if total_price == N:
                isJustN = True
                break

Result = ''
Result = 'Yes' if isJustN == True else 'No'
print(Result)

Solution (Python):

N = int(input())

cake_price = 4
donut_price = 7

max_cake = N // cake_price
max_donut = N // donut_price

isJustN = False
if max_cake * cake_price == N or max_donut * donut_price == N:
    isJustN = True
else:
    for c in range(1, max_cake + 1):
        for d in range(1, max_donut + 1):
            total_price = cake_price * c + donut_price * d
            if total_price == N:
                isJustN = True
                break

Result = ''
if isJustN == True:
    Result = 'Yes'
else:
    Result = 'No'
print(Result)

Solution (Python):
n=int(input())
if n%4==0:
    print('Yes')
elif n%4==1 and n>=21:
    print('Yes')
elif n%4==2 and n>=14:
    print('Yes')
elif n%4==3 and n>=7:
    print('Yes')
else:
    print('No')

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

Solution (Python):
l4=[4*i for i in range(100//4+1)]
l7=[7*i for i in range(100//7+1)]
l=[]
for x in l4:
    l.extend(map(lambda y:y+x,l7))

print('Yes' if int(input()) in l else 'No')

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

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

for i in range(14):
    for j in range(14):
        if 4*i + 7*j == s:
            print('Yes')
            exit()
print('No')

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

for i in range(n):
  for j in range(n):
    if 4*i+7*j==n:
      judge+=1
if judge!=0:
  print('Yes')
if judge==0:
  print('No')

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


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

print("No")

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

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

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

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

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
            break
        elif 4*i + 7*j > n:
            break
    if flag:
        break

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

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

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

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

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

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

for c in range(N // 4 + 1):
    for d in range(N // 7 + 1):
        if 4 * c + 7 * d == N:
            print("Yes")
            exit()
print("No")

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

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

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

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

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

l = set()
for i in range(0, 101) :
    for j in range(0, 101) :
        l.add(4*i + 7*j)
        
if N in l :
    print('Yes')
else :
    print('No')

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

for n_cake in range(N//4 + 1):
    for n_donut in range(N//7 + 1):
        if 4*n_cake + 7*n_donut == N:
            print("Yes")
            exit()
print("No")

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

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

print(ans)

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

if n%4 == 0:
    flg = True
elif n%7 ==0:
    flg = True
else:
    for i in range(0,n//7 + 1):
        if (n - 7*i)%4 == 0:
            flg = True
            break

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

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

print(flg)

Solution (Python):
n=int(input())
l=[0,7,14,21]
count=0
for i in l:
    if n%7==0:
        count+=1
        break
    elif (n-i)>0 and (n-i)%4==0:
        count+=1
        break
    else:
        count=0
print('Yes' if count>0 else 'No')

Solution (Python):
N=int(input())
n=[]
for i in range(0,26):
  for j in range(0,16):
    n.append(4*i+7*j)
if any(N==M for M in n):
  print("Yes")
else:
  print("No")

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

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

print("No")

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

flag = False

for i in range(N//4+1):
    a = 4 * i
    for j in range(N//7+1):
        b = 7 * j
        if a+b==N:
            flag = True
        elif a+b>N:
            break

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

Solution (Python):
n = int(input())
ans  = [True for i in range(26) for j in range(15) if 4*i+7*j==n]
print('Yes' if sum(ans)>=1 else 'No')

Solution (Python):
N=int(input())
output='No'
i=0
while i*4<=N:
  if (N-i*4)%7==0:
    output='Yes'
  i+=1
print(output)

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

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

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

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

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

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

ans = 'No'
for c in range(0, N//4+1):
    for d in range(0, N//7+1):
        if 4*c+7*d==N:
            ans = 'Yes'
            print(ans)
            exit()
print(ans)

Solution (Python):
def main():
    N = int(input())
    if(N<4):
        print('No')
        return
    if(N%4==0 or N%7==0):
        print('Yes')
        return
    
    tmp = 0
    while(N>tmp):
        if((N-tmp)%4==0):
            print('Yes')
            return
        tmp = tmp+7
    
    print('No')
    


if __name__ == "__main__":
    main()

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())
for i in range(N//7+1):
    if (N-i*7) % 4 == 0:
        print('Yes')
        exit()
print('No')

Solution (Python):
n = {int(input())}
set = {4*a + 7*b for a in range(100) for b in range(100)}
if set & n:
  print('Yes')
else:
  print('No')

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

max_4 = int(N / 4)
max_7 = int(N / 7)

cost_list = []
for i in range(max_7 + 1):
    for j in range(max_4 + 1):
        cost = 7 * i + 4 * j
        cost_list.append(cost)


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

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()

def check(cost):
    if cost == n:
        return 1
    if cost > n:
        return 0

    return check(cost+4) or check(cost+7)

if check(0) == 1:
    print('Yes')
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):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    i = 0
    j = 0
    flg = 0
    while 4 * i <= n:
        j = 0
        while 4 * i + 7 * j <= n:
            if 4 * i + 7 * j == n:
                flg = 1
                break
            j += 1
        if flg:
            pass
        i += 1

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


if __name__ == "__main__":
    main()

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    for i in range(n + 1):
        for j in range(n + 1):
            if i * 7 + j * 4 == n:
                print("Yes")
                exit()
    print("No")


if __name__ == '__main__':
    slove()

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

Solution (Python):
n=int(input())
def just(n,sho):
    for i in range(sho+1):
        m=4*i
        while m!=n:
            m+=7
            if m>n:
                break
            if m==n:
                return print("Yes")
    return print("No")

if n%4==0 or n%7==0 or n%11==0:
    print("Yes")
else:
    just(n, n//4)

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

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

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

Solution (Python):
import sys

N = int(input())
for c in range(0,26):
    for d in range(0,15):
        if c * 4 + d * 7 == N:
            print('Yes')
            sys.exit()
print('No')

Solution (Python):
price = int(input())
cnt = 0

for i in range(26):
    for j in range(17):
        z = price - (4*i + 7*j)
        if z == 0:
            cnt += 1
            break

if cnt >= 1:
    print('Yes')
else:
    print('No')

Solution (Python):
price = int(input())
cnt = 0

for i in range(26):
    for j in range(17):
        z = price - (4*i + 7*j)
        if z == 0:
            cnt += 1

if cnt >= 1:
    print('Yes')
else:
    print('No')

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

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

for a in range(100):
    for b in range(100):
        if a * 4 + b * 7 == N:
            print("Yes")
            exit()
print("No")

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

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

max_cakes = N // 4
max_donuts = N // 7

Found = False

for i in range(max_cakes + 1):
    for j in range(max_donuts + 1):
        if i * 4 + j * 7 == N:
            Found = True
            break
    else:
        continue
    break

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

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

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

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

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

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

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

a=False

for i in range(N):
    for j in range(N):
        price=4*i+7*j
        if price == N:
            a=True

if a:
    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"
    break
print(ans)

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

A=[]
B=[]
C=[]
for i in range(1,26):
    A.append(i*4)
for i in range(1,16):
    B.append(i*7)
for i in range(1,26):
    for j in range(1,16):
        C.append(4*i+7*j)
        
D=A+B+C

if D.count(N)>=1:
    print('Yes')
else:
    print('No')

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

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

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

if __name__ == "__main__":
    CakesandDonuts()

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

Solution (Python):
n = int(input())
can_make = [False for i in range(101)]
four = [4*i for i in range(26)]
seven = [7*i for i in range(15)]

for f in four:
    for s in seven:
        if f+s <= 100:
            can_make[f+s]=True

if can_make[n]:
    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 + j * 7 == n:
            print("Yes")
            exit()
print("No")

Solution (Python):
N = int(input())
ret = "No"
for c_i in range(N // 4 + 1):
    for d_i in range(N // 7 + 1):
        total = 4 * c_i + 7 * d_i
        if total == N:
            ret = "Yes"
            break
print(ret)

Solution (Python):
N = int(input())
ret = "No"
for c_i in range(N + 1):
    for d_i in range(N + 1):
        total = 4 * c_i + 7 * d_i
        if total == N:
            ret = "Yes"
            break
print(ret)

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

Solution (Python):
n=int(input())
ans="No"
for i in range(n//7+1):
    if (n-i*7)%4==0:
        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 n == 4 * i + 7 * j:
            print("Yes")
            break
    else:
        continue

    break
else:
    print("No")

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

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

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

print("No")

Solution (Python):
n=int(input())
c=0
for i in range(1,26):
    for j in range(15):
        if n%(4*i+7*j)==0:
            c=1
            break
print('Yes'if n==7 or c==1 else'No')

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

cupper=n//4
dupper = n//7
flag = False

for x in range(cupper+1):
    for y in range(dupper+1):
        if (4 * x + 7 * y == n):
            flag = True
            break
if flag:
    print ("Yes")
else:
    print ("No")

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

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

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

Solution (Python):
M=[0]*101

for i in range(26):
  for j in range(15):
    if 4*i+7*j<=100:
      M[4*i+7*j]=1


print("Yes" if M[int(input())]==1 else "No")

Solution (Python):
N = int(input())
if [1 for i in range(N//4+1) for j in range(N//7+1) if int(i*4+j*7)==N].count(1) > 0: print('Yes')
else: print('No')

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

N = int(input())

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

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

ans = "No"
if N < 4:
    ans = "No"
elif N%4 == 0 or N%7 == 0:
    ans = "Yes"
else:
    for a in range(0, 25):
        for b in range(0, 15):
            if 4*a + 7*b == N:
                ans = "Yes"
                break
print(ans)

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

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

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n = int(input())

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

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

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

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

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

for a in range(100 // 4 + 1):
    for b in range(100 // 7 + 1):
        if 4 * a + 7 * b == N:
          print("Yes")
          exit()
print("No")

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

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

Solution (Python):
import math
import sys
n = int(input())
max7 = math.ceil(n / 7)
for m in range(max7+1):
    if (n-7*m) >= 0 and (n-7*m)%4 == 0:
        print('Yes')
        sys.exit()
print('No')

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