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-----
11

-----Sample Output-----
Yes

If you buy one cake and one doughnut, the total will be 4 + 7 = 11 dollars.

Difficulty: introductory

Starter code:

Solutions:
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)

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


import sys
n = int(input())
for i in range(int(n/4)+1):
    for j in range(int(n/7)+1):
        if 4 * i + 7 * j == n:
            print('Yes')
            return
print('No')

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)

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

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

def __starting_point():
    resolve()

__starting_point()

n = int(input())

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

N=int(input())

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

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

def readinput():
    n=int(input())
    return n

def main(n):
    for k in range(n//4+1):
        if (n-4*k)%7 == 0:
            return 'Yes'
    else:
        return 'No'

def __starting_point():
    n=readinput()
    ans=main(n)
    print(ans)

__starting_point()

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")
                return
    print("No")


main()

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)

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


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

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

N = int(input())

if N >= 18 or N in [4, 7, 8, 11, 12, 14, 15, 16]:
    print('Yes')
else:
    print('No')

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

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


n = int(input())
for i in range(0,26):
    for j in range(0,16):
        if 4*i + 7*j == n:
            print('Yes')
            return


print('No')

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

n = int(input())
#a, b = map(int,input().split())
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

flag = 'No'

for i in range(0, n//4+2):  # cake
    for j in range(0, n//7+2):  # donuts
        if 4*i + 7*j == n:
            flag = 'Yes'
print(flag)


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

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)


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')
      return
    
print('No')

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


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)

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

# -*- coding: utf-8 -*-

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)

#!/usr/bin/env python3


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")
                return
    print("No")


main()


N=int(input())
def rec(n):
    if n < 0: return False
    if n % 4 == 0 or n % 7 == 0: return True
    else: return rec(n-4)
if rec(N): print('Yes')
else: print('No')

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

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


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

N = int(input())
for i in range(14):
    for j in range(25):
        if 7*i + 4*j == N:
            print('Yes')
            return

print('No')

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

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)


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)

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

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

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

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")
            return
print("No")


n = int(input())
for x in range(n + 1):
  for y in range(n + 1):
    if x * 4 + y * 7 == n:
      print("Yes")
      return
print("No")


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

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

print("No")

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

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

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)


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)

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")
            return
print("No")

n = int(input())

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

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



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

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

N = int(input())

cake = 4
# cake max 25
donatu = 7
# donatu max 14

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

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

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

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

n = int(input())

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

#print(ans)

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


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

n = int(input())
dp = [False] * (n+10)
dp[0] = True
for i in range(n):
    if dp[i]:
        dp[i+4]=True
        dp[i+7]=True
if dp[n]:
    print('Yes')
else:
    print('No')

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')
      return
print('No')

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

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 
      return
    else:
      pass

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

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)

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

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")
      return

print("No")

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)

import sys

N = int(input())

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

print("No")

n = int(input())

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

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

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

N = int(input())

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

n = int(input())

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

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

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')
            return
print('No')

n = int(input())
for i in range(101):
    if (n-i*7)%4 == 0 and n >= i*7:
        print('Yes')
        return
print('No')

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

N = int(input())

for cake in range(N):
    for dornat in range(N):
        if 4*cake + 7*dornat == N:
            print('Yes')
            return
        
print('No')

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

print('No')

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


def __starting_point():
    main()

__starting_point()

N = int(input())

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

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')
            return
else:
    print('No')


n = int(input())

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

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


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

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


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

# -*- coding: utf-8 -*-
# 標準入力を取得
N = int(input())

# 求解処理
ans = "No"
for d in range(N // 7 + 1):
    if (N - 7 * d) % 4 == 0:
        ans = "Yes"
        break

# 結果出力
print(ans)


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')
            return
print('No')


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)

N = int(input())

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

print("No")

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

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


n = int(input())

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

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

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

else:
    print("No")

N = int(input())

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

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

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

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

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)

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