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())
cnt = 0
for i in range(30):
    for j in range(20):
        price = 4 * i + 7 * j
        if price == n:
            cnt += 1
if cnt == 0:
    print('No')
else:
    print('Yes')

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    for i in range(30):
        nokori = N - 7 * i
        if nokori >= 0 and nokori % 4 == 0:
            print("Yes")
            return
    print("No")
    return

main()

Solution (Python):
def answer(n: int) -> str:
    for i in range(n // 4 + 1):
        for j in range(n // 7 + 1):
            if n == i * 4 + j * 7:
                return 'Yes'

    return 'No'


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


if __name__ == '__main__':
    main()

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())
for i in range(0,4):
  if N-7*i>=0 and (N-7*i)%4==0:
    print("Yes")
    break
else:
  print("No")

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

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

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

Solution (Python):
import sys

N = int(input())

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

print("No")

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

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

if n >= 18:
    print("Yes")
    exit()

ans_list = [4,7,8,11,12,14,15,16]

if n in ans_list:
    print("Yes")
    exit()

else:
    print("No")

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

Solution (Python):
N = int(input())
for c4 in range(26):
    for c7 in range(16):
        c = 4*c4 + 7*c7
        if c == N:
            print('Yes')
            exit()
print('No')

Solution (Python):
n=int(input())
if n==4 or n==7 or n==8 or n==11 or n==12 or n==15 or n==16 or n>=18:
    print("Yes")
else:
    print("No")

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

Solution (Python):
N = int(input())
ans = "No"
if N%4==0:
    ans = "Yes"
for i in range(15) :
    N = N - 7
    if N < 0:
        break
    if N%4==0:
        ans = "Yes"
print(ans)

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

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

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

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

Solution (Python):
N = int(input())
CA = 4
DO = 7

for i in range(25):
    for j in range(15):
        Z = CA * i + DO * j
        if Z == N:
            print("Yes")

            exit()
            
print("No")

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

Solution (Python):
def main():
    n = int(input())
    cakes = range(n // 4 + 1)
    donuts = range(n // 7 + 1)

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


main()

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

print("No")

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

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

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

Solution (Python):
N=int(input())
for i in range(26):
   for j in range(15):
      if i*4+j*7==N:
         print("Yes")
         exit()
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")
      quit()
else:
  print("No")

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

for i in range(25):
  for j in range(14):
    if i*4 + j*7 == N:
      print("Yes")
      c += 1 
      exit()
    else:
      pass

if c == 0:
   print("No")
else:
  pass

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

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

c=0
for i in range(0,n//4+1):
  for j in range(0,n//7+1):
    if 4*i+7*j==n:
      c+=1

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

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

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

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

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

dp = [False] * (n + 1)
dp[0] = True
for i in range(n-3):
    if dp[i]:
        dp[i+4] = True
for i in range(n-6):
    if dp[i]:
        dp[i+7] = True

if dp[n]:
    print('Yes')
else:
    print('No')

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

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

cake = 4

donatu = 7


jage = "No"
for d in range(15):
    for c in range(26):
        if cake * c + donatu * d == N:
            jage = "Yes"
print(jage)

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

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

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

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

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

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

for i in range(26):
  for j in range(15):
    if 4 * i + 7 * j == n:
      print('Yes')
      quit()
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()
print('No')

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

if n >= 18:
    print('Yes')
elif n % 4 == 0 or n % 7 == 0:
    print('Yes')
elif n - 7 >= 0 and (n - 7) % 4 == 0:
    print('Yes')
else:
    print('No')

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

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

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

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    s = set()

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

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


if __name__ == '__main__':
    main()

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

for i in range(int(n / 4 + 1)):
    for j in range(int(n / 7 + 1)):
        if(flag == False):
            if(i * 4 + j * 7 == n):
                print("Yes")
                flag = True

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

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

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

Solution (Python):
import sys
n = int(sys.stdin.readline().rstrip("\n"))
l = [False]*101
for a in range(26):
    for b in range(15):
        if 0<(4*a+7*b)<=100:
            l[4*a+7*b] = True
if l[n]:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
x = 100//7+2
for i in range(x):
    for j in range(x):
        if 4*i+7*j == n:
            print("Yes")
            break
    else:
        continue
    break
else:
    print('No')

Solution (Python):
n = int(input())
x = 100//7+2
for i in range(x):
    for j in range(x):
        if 4*i+7*j == n:
            print("Yes")
            break
    else:
        continue
    break
else:
    print('No')

Solution (Python):
n = int(input())
f = n // 4
s = n // 7

flag = False
for i in range(f + 1):
    for j in range(s + 1):
        total = i * 4 + j * 7
        if total == n:
            flag = True
            break

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

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

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

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

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

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

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

print("No")

Solution (Python):
n = int(input())
s = "No"

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

Solution (Python):


N = int(input())

cake = 4
donuts = 7

ans = 'No'
for i in range(N//donuts+1):
    reminder = N-i*donuts
    if reminder % cake == 0 or reminder==0:
        ans = 'Yes'
        break

print(ans)

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

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

ans = "No"

for i in range(15):
  for j in range(26):
    if (i*7+j*4) == N:
      ans = "Yes"
    else:
      pass
    
print(ans)

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

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

for 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())
cnt = 0

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

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

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

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



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

Solution (Python):



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


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
out = 'No'
for x in range(N // 4 + 1):
	for y in range(N // 7 + 1):
		if 4 * x + 7 * y == N:
			out = 'Yes'
			break
print(out)

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

Solution (Python):



def main():
    N = int(input())
    for f in range((N // 4) + 1):
        for s in range((N // 7) + 1):
            if 4 * f + 7 * s == N:
                print("Yes")
                exit(0)
    print("No")


main()

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

max_4 = 25
max_7 = 14

answer = 'No'
for i in range(max_4 + 1):
  for j in range(max_7 + 1):
    sum = 4 * i + j * 7
    if sum == N:
      answer = 'Yes'
      break
  if answer == 'Yes':
    break

print(answer)

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):
ans = int(input())
loopFlg = True

for i in range(26):
  if loopFlg == False:
    break
  for j in range(15):
    if 4*i + 7*j == ans:
      loopFlg = False

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

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

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

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

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

Solution (Python):
n = int(input())
for x in range(n + 1):
  for y in range(n + 1):
    if x * 4 + y * 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 ())
x = 'No'
while N >= 0:
  if N%4 == 0:
    x = 'Yes'
    break
  N -= 7
print (x)

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

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

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()

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

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

if __name__ == '__main__':
    resolve()

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

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

print("No")

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

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
print("Yes" if ans==1 else "No")

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

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

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

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

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

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")
            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 n==4*i+7*j:
            ans = "Yes"
            break
print(ans)

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

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

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())
b=0
for i in range(0,26):
    for j in range(0,16):
        if 4*i+7*j==N:
            b+=1
if b!=0:
    print('Yes')
else:
    print('No')

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

for i in range(26):
  for j in range(16):
    total = 4*i + 7*j
    
    if total==N:
      answer="Yes"

print(answer)

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

print(ans)

Solution (Python):
N = int(input())
ans = 'No'
for i in range(30):
    for j in range(30):
        if 4*i + 7*j == N:
            ans = 'Yes'
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()
else:
    print("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 
if ans:
    print("Yes")
else:
    print("No")

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

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

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

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

p_list = []
for a in range(26):
    for b in range(16):
        p = 4 * a + 7 * b
        p_list.append(p)
a = p_list.count(N)
if a > 0:
    print('Yes')
else:
    print('No')

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

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

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

print("No")

Solution (Python):
if __name__ == '__main__':

    n = int(input())
    
    flg = False

    for i in range(0,101,4):
        for j in range(0,101,7):
            if i + j > 100:
                break
            if n - (i+j) == 0:
                flg = True
                break
        if flg:
            break

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

Solution (Python):
N=int(input())
L=[0]
for i in range(30):
  L+=[i+4 for i in L]+[i+7 for i in L]
  L=list(set(L))
if N in L:
  print("Yes")
else:
  print("No")

Solution (Python):



import unittest
from io import StringIO
import sys


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)


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


if __name__ == "__main__":
    
    resolve()

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

f = False

for i in range(26):
    for j in range(15):
        if 4 * i + 7 * j == n:
            f = True
            break
        else:
            pass

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

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

count = 0

for i in range(26):
    for j in range(15):
        if 4 * i + 7 * j == n:
            count += 1
            break
        else:
            pass

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

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())
l = [1, 2, 3, 5, 6, 9, 10, 13, 17]
if n not in l:
    print("Yes")
else:
    print("No")

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

Solution (Python):
import math

N = int(input())
ck = math.floor(N/4)
dk = math.floor(N/7)

c = 4
d = 7
result = False

for i in range(ck+1):
    for j in range(dk+1):
        if (N == c * i + d * j):
            result = True
            break

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

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

c = 4
d = 7
result = False

for i in range(26):
    for j in range(15):
        if (N == c * i + d * j):
            result = True
            break

if result == True:
    print('Yes')
else:
    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())
for i in range(N//4+1):
  if (N%(4*(i+1)))%7==0:
    print("Yes")
    break
else:
  for j in range(N//7+1):
    if (N%(7*(j+1)))%4==0:
      print("Yes")
      break
  else:
    if N%4==0 or N%7==0:
      print("Yes")
    else:
      print("No")

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    print('No')
    return


if __name__ == '__main__':
    main()

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

four = 0

while 4*four <= N:
    X = N - 4*four
    if X % 7 == 0:
        print("Yes")
        exit()
    four += 1

print("No")

Solution (Python):
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    for i in range(100):
        for j in range(100):
            if i * 4 + j * 7 == n:
                print('Yes')
                return
    print('No')


if __name__ == '__main__':
    main()

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

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

	if is_able:
		print("Yes")
	else:
		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 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
n = int(input())

if n%4 == 0 or n%7 == 0:
    print('Yes')
else:
    for i in range(n//4+1, 0, -1):
        j = 0
        while i*4+j*7 < n:
            j += 1
        if i*4+j*7 == n:
            print('Yes')
            sys.exit()
    print('No')

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

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

if not f:
  print('No')

Solution (Python):









n = int(input())

l = []
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())

l = []
for i in range(100//4):
    for j in range(100//7):
        l.append(i*4+j*7)
if n in l:
    print("Yes")
else:
    print("No")

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

for i in range(N):
    for j in range(N - i):
        if 4 * i + 7 * j == N:
            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())

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

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

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

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

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

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

if N >= (4-1) * (7-1):
  print("Yes")
elif N in [4, 7, 8, 11, 12, 14, 15, 16]:
  print("Yes")
else:
  print("No")

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

flg = False

a = int(N/4)
b =int(N/7)

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

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

ans = "No"

for four in range(N//4 + 1):
  if (N - four * 4)%7 == 0:
    ans = "Yes"
    break
print(ans)

Solution (Python):
N = int(input())
flag = False
for a in range(25):
  for b in range(14):
    if 4*a+7*b==N:
      flag = True

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

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

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
Flag = False
for Cake in range(0,26):
    for Doughnut in range(0,16):
        if 4*Cake+7*Doughnut==N:
            Flag = True
            break
    if Flag:
        break
if Flag:
    print('Yes')
else:
    print('No')

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

Solution (Python):
n=int(input());print('NYoe s'[n not in [1,2,3,5,6,9,10,13,17]::2])

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

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

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