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

Solution (Python):
import math
n = int(input())
ans = ''
for i in range(math.floor(n / 4) + 1):
  if ans == '':
    m = n
    m -= 4 * i
    if m % 7 == 0:
      ans = 'Yes'
    else:
      next
if ans == '':
  ans = 'No'
print(ans)

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

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

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

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

Solution (Python):
n=int(input())
frag='No'
for i in range(n//4+2):
  if (n-4*i)%7==0:
    frag="Yes"
    break
print(frag)

Solution (Python):
import bisect
import copy
import heapq
import math
import sys
from collections import *
from itertools import accumulate, combinations, permutations, product

from functools import lru_cache
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())

for i in range(100):
    for j in range(100):
        if 4*i+j*7==n:
            print("Yes")
            quit()
print("No")

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

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

Solution (Python):
N=int(input())
C_max=N//4
D_max=N//7
M=0

for i in range(C_max+1):
    for j in range(D_max+1):
        if N== 4*i+7*j:
            M+=1
if M==0:
    print("No")
else:
    print("Yes")

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

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

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

found = False
for x in range(0, 25+1):
    for y in range(0, 14+1):
        if 4 * x + 7 * y == N:
            found = True
if found:
    print("Yes")
else:
    print("No")

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

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

print('No')

Solution (Python):
def main():
    total = int(input())
    i = 0
    j = 0

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

    print('No')

main()

Solution (Python):
n = int(input())
a = n//4
b = n//7
ans = False

for i in range(a+1):
  for j in range(b+1):
    if i*4+j*7 == n:
      ans = True

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

Solution (Python):
N = int(input())
flag =0 
ext1 = N // 4
ext2 = N // 7

if ext1 == 0:
  print("No")
else:
  for i in range(ext1 +1):
    for j in range (ext2 +1):
      if i*4 + j*7 ==N:
        flag +=1
  print("Yes"if flag >0 else "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())
ans = "No"
for cake_n in range(30):
    for donut_n in range(15):
        if n == cake_n * 4 + donut_n * 7:
            ans = "Yes"
print(ans)

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

Solution (Python):
n = int(input())
ans = "No"
for cake_n in range(30):
    for donut_n in range(15):
        if n == cake_n * 4 + donut_n * 7:
            ans = "Yes"
print(ans)

Solution (Python):
def main():
    n = int(input())
    m = 100 // 7 + 1
    flag = False
    for i in range(m):
        for j in range(m):
            if n == i * 7 + j * 4:
                flag = True
                if flag:
                    print('Yes')
                    break
        else:
            continue
        break
    if not flag:
        print('No')
if __name__ == '__main__':
    main()

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

s = 0
y = 0

for c in range(26):
    for d in range(15):
        s = c*4 + d*7
        if s == N:
            y += 1
            print('Yes')
            break
        else:
            pass
    if y > 0:
        break
    else:
        pass

if y == 0:
    print('No')
else:
    pass

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

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

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

count = 0
for i in range(int(100/4)+1):
    for j in range(int(100/7)+1):
        if n == 4*i+7*j:
            print('Yes')
            sys.exit(0)

print('No')

Solution (Python):

N = int(input())


if N < 4:
    print("No")
else:
    for seven_n in range(0, N + 1, 7):
        if (N - seven_n) % 4 == 0 or N - seven_n == 0:
            print("Yes")
            exit(0)
    print("No")

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

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

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

Solution (Python):
N = int(input())
ans = "No"
while (N >= 0):
  if N % 4 == 0 or N % 7 == 0:
    ans = "Yes"
  N -= 11
print(ans)

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

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

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

Solution (Python):
n = int(input())
xmax, ymax = n//4, n//7
ok = False
for x in range(0, xmax+1):
    for y in range(0, ymax+1):
        if n == 4*x + 7*y:
            ok = True
            break
    if ok: break
print("Yes" if ok else "No")

Solution (Python):
n = int(input())
a = n//4 
b = n//7 
ok = False
for x in range(0,a+1):
    for y in range(0,b+1):
        if n == 4*x + 7*y:
            ok = True
            break
    if ok: break

if ok: 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):
import math
N = int(input())

flag = False

for i in range(math.ceil(N/7)+1):
    for j in range(math.ceil(N/4)+1):
        if flag == True:
            continue
        
        if N - i * 7 - j * 4 == 0:
            flag = True

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

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

flag = False

for i in range(100):
    for j in range(100):
        if flag == True:
            continue
        
        if N - i * 7 - j * 4 == 0:
            flag = True

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

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

Solution (Python):
N=int(input())
c=4
d=7
ans=0
ans2=0
ans3="No"
for i in range(15):
    ans=d*i
    if ans !=N:
        for j in range(26):
            ans2=ans+c*j
            if ans2==N:
                ans3="Yes"

    else :
        ans3="Yes"

print(ans3)

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

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

print("No")

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

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

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

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

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

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

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

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

Solution (Python):

import sys


n = int(input())

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

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

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

print('No')

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

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

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

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

if N%2==1:
    N = N-7
if N%4==2:
    N = N-14
if (N%4==0)and(N>=0):
    print("Yes")
else:
    print("No")

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

C = 4
D = 7
value = 0
ans = "No"

for i in range(100):
    for j in range(100):
        value = C * i + D * j
        if value == N:
            ans = "Yes"
            break

print(ans)

Solution (Python):
n=int(input())
l=[n]
while n>6:
    n=n-7
    l.append(n)
print('Yes' if any([l[j]%4==0 for j in range(len(l))]) else 'No')

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

dp = [False]*110
dp[4] = dp[7] = True

for i in range(101):
  if dp[i]:
    dp[i+4] = True
    dp[i+7] = True
  
if dp[n]:
  print("Yes")
else:
  print("No")

Solution (Python):


N = int(input())

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

    print('No')

Solution (Python):
n = int(input())
cake = 4
donut = 7

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

print("No")

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

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

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

print(a)

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

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

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

for i in range(26):
  if (N-i*4)% 7 == 0 and N>= i*4:
    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):
        if i*4+j*7==n:
            ans="Yes"
            break
print(ans)

Solution (Python):
N = int(input())
c_range = -(-N // 4) + 1
d_range = -(-N // 7) + 1
for d in range(d_range):
    for c in range(c_range):
        if c * 4 + d * 7 == N:
            print('Yes')
            break
    else:
        continue
    break
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 (i*4)+(j*7)==n:
            ans = "Yes"
            break
print(ans)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18


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

Solution (Python):
n = int(input())
a = [i*4 for i in range(n//4 + 1)]
b = [i*7 for i in range(n//7 + 1)]

c =set()
for i in a:
    for j in b:
        if i+j != 0 and i+j <=n:
            c.add(i+j)
            
if n in c:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
time = N // 7
bl = False

for x in range(time+1):
    y = N - x * 7
    if y % 4 == 0:
        bl = True; break

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

Solution (Python):
n = int(input())
count = 0
for k in range(26):
    for d in range(14):
        if 4*k + 7*d == n:
            count += 1
print('Yes' if count >= 1 else 'No')

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

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

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):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        n=int(input())
        for cake in range(26):
            for donut in range(15):
                if cake*4+donut*7==n:
                    return 'Yes'
        return 'No'
    print(main())
resolve()

Solution (Python):
"""
k,s=map(int,input().split())
x=[0]*k
for i in range(0,k):
  x[i]=i
x.append(k)
a=int(s/3)-1
count=0
for i in range(0,len(x)):
  stemp=s-x[i]
  for j in range(0,min(k+1,stemp)):
    if stemp-x[j] in x:
      count=count+1
print(count)
"""
n=int(input())
temp=[]
i=1
j=0
while True:
  temp.append(i*4+j*7)
  i=i+1
  if (i-1)*4+j*7>100:
    i=0
    j=j+1
  if j>=15:
    break
for i in range(0,len(temp)):
  if temp[i]==n:
    print("Yes")
    break
else:
  print("No")

Solution (Python):
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())

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

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

Solution (Python):
from sys import exit

n=int(input())

while n>0:
	if n%7==0:
		print("Yes")
		exit()
	n-=4
	if n==0:
		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")
        break
else:
    print("No")

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

Solution (Python):
n = int(input())
a = 25
b = 15

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

Solution (Python):
import sys

N = int(input())
for cake in range(30):
    for donut in range(15):
        if 4*cake+7*donut == N:
            print('Yes')
            sys.exit()

print('No')

Solution (Python):
inf = 10 ** 15
mod = 10 ** 9 + 7

n = int(input())
tmp = 0
flag = False
while tmp <= n:
    if (n-tmp) % 7 == 0:
        flag = True
    tmp+=4
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
import math
import bisect

def solve(n):
    for i in range(200):
        for j in range(200):
            if i * 4 + j * 7 == n:
                return True
    return False

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

if __name__ == "__main__":
    main()

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

print(ans)

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

print("No")

Solution (Python):
import math
N = int(input())
a = math.floor(N / 4)
b = math.floor(N / 7)
ans = "No"
for i in range(a + 1):
  for j in range(b + 1):
    if i * 4 + j * 7 == N:
      ans = "Yes"
      break
  else:
    continue
  break
print(ans)

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

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

Solution (Python):
N = int(input())
res = "No"
for c in range(N//4 + 1):
    for d in range(N//7 + 1):
        total = 4*c + 7*d
        if total == N:
            res = "Yes"
print(res)

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

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

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

Solution (Python):


def main():
    n = int(input())
    res = 'No'

    for i in range(100 // 4):
        for j in range((100-i) // 7):
            if 4 * i + 7 * j == n:
                res = 'Yes'
                break
    
    print(res)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
n = int(input())
count = 0
for cake in range(25 + 1):
    for donut in range(14 + 1):
       if n - cake * 4 - donut * 7 == 0:
           print('Yes')
           exit()
print('No')

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

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

Solution (Python):
import math

N = int(input())
str = 'No'
for i in range (math.floor( N/4 )+1):
    for j in range(math.floor(N/7)+1):
        if 4*i + 7*j == N:
            str = 'Yes'
print(str)

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())
count = 0
for i in range(26):
    for j in range(16):
        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):
n = int(input())
ans = 0
for i in range(16):
    for j in range(26):
        if 7*i + 4*j == n:
            print("Yes")
            exit()
else:
    print("No")

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

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

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

Solution (Python):
import sys
from bisect import bisect_left
INF = 1 << 30

def main():
    N = int(input())
    for i in range(100):
        for j in range(100):
            if 4*i + 7*j == N:
                print('Yes')
                return
    print('No')
if __name__ == '__main__':
    main()

Solution (Python):
number_4 = []
number_7 = []

for i in range(101):
    if i % 4 == 0:
        number_4.append(i)
    if i % 7 == 0:
        number_7.append(i)

n = int(input())

found = False
for i in range(len(number_4)):
    if found:
        break
    if n < 4:
        break
    for j in range(len(number_7)):
        if number_4[i] + number_7[j] == n:
            found = True
            break

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

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

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

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

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

if (N <= 3):
    ans = 'No'
else:
    mod_7 = N // 7
    
    ans = 'No'
    
    for i in range(mod_7 + 1):
        n = N
        n -= 7 * i
        
        if (n % 4 == 0):
            ans = 'Yes'
            break


print(ans)

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

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

print("No")

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

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

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

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

l4 = N // 4
l7 = N // 7

ck = 0

for i in range(l4+1):
  for j in range(l7+1):
    
    if i * 4 + j * 7 == N:
      ck = 1
      
if ck == 0:
  print("No")
else:
  print("Yes")

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

Solution (Python):
def solve(cu_num):
    if cu_num < 4:
        return False
    if cu_num % 4 == 0 or cu_num % 7 == 0:
        return True
    return solve(cu_num-4) or solve(cu_num-7)


num = int(input())

if solve(num):
    print('Yes')
else:
    print('No')

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

x = 0

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

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

Solution (Python):
import sys

N = int(input())

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

print('No')

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

Solution (Python):
def num_4x_list():
    
    return [4 * i for i in range(1, (100 // 4) + 1)]


def num_list_comb_4_7():
    
    diff = 7 - 4  

    x = set()

    for i, num_4x in enumerate(num_4x_list(), start=1):
        for j in range(i + 1):
            element = num_4x + diff * j
            x |= {element}

    return {y for y in x if y <= 100}


def actual(N):
    if N in num_list_comb_4_7():
        return 'Yes'

    return 'No'

  
  
N = int(input())

print(actual(N))

Solution (Python):

def actual(N):
    """
    発想: 4 と 7 の和の組み合わせで表現できる数を列挙する(最大は100)
    """
    num_4x_list = [4 * i for i in range(1, (100 // 4) + 1)]

    set_all = set()

    for i, num_4x in enumerate(num_4x_list, start=1):
        for j in range(i + 1):
            element = num_4x + 3 * j

            if element <= 100:
                set_all |= {element}

    if N in set_all:
        return 'Yes'

    return 'No'
  
  
N = int(input())

print(actual(N))

Solution (Python):

N = int(input())

A = []
for i in range((N//4)+1) :
    for j in range((N//7)+1) :
        if N == 4*i + 7*j :
            A.append("Yes")
        else :
            A.append("No")

if "Yes" in A :
    print("Yes")
else :
    print("No")

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

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

A_ = X//4+1
B_ = X//7+1

ans = 0
for a in range(A_):
  for b in range(B_):
    c = 4*a + 7*b
    if c > X:
      break
    if c == X:
      ans = 1
      break
if ans == 1:
  print("Yes")
else:
  print("No")

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

Solution (Python):
N = int(input())
max7 = N // 7
ans = 0

for x in range(max7 + 1):
    if (N - 7 * x) % 4 == 0:
        ans = 1

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

Solution (Python):
n = int(input())
while n>0:
    if n%4==0:
        print("Yes")
        break
    elif n%7==0:
        print("Yes")
        break
    elif n%11==0:
        print("Yes")
        break
    elif(1):
            i=1
            n = n-4*i
            if n%7==0:
                print("Yes")
                break
            if n<=0:
                print("No")

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

if (N%4)==0:
    print("Yes")
elif(N%7)==0:
    print("Yes")
elif(N%11)==0:
    print("Yes")
elif(1):
    while N>0:
        i=1
        N=N-11*i
        if(N<0):
            print("No")
            break
        if(N%4)==0 or (N%7)==0:
            print("Yes")
            break
        i=i+1

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

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

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

Solution (Python):
N = int(input())
flag = False
if N % 4 == 0 or N % 7 == 0:
  flag = True
else:
  i = 0
  while i * 4 <= 100:
    i += 1
    if N % (i * 4) % 7 == 0 or N % (i * 7) % 4 == 0:
      flag = True
      break

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

Solution (Python):
n = int(input())
cmax = 100 // 4
dmax = 100 // 7
for i in range(0, cmax + 1):
    for j in range(0, dmax + 1):
        if i * 4 + j * 7 == n:
            print("Yes")
            exit()
print("No")

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

while n % 4 != 0:
    n -= 7

    if n < 0:
        print("No")
        exit()
print("Yes")

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

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

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

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

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    for i in range(26):
        for j in range(15):
            if 4 * i + 7 * j == n:
                print('Yes')
                exit()
    print('No')


if __name__ == "__main__":
    main()

Solution (Python):

N = int(input())

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

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

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

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

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

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