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

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 i*4+j*7 == n:
            print('Yes')
            exit(0)
print("No")

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

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

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

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

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

Solution (Python):
def resolve():
    n = int(input())
    for i in range(n):
        flag = False
        for j in range(n):
            if n == 4 * i + 7 * j:
                print("Yes")
                flag = True
                break
        if flag:
            break
    if not flag:
        print("No")
resolve()

Solution (Python):

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

print(ans)

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

hantei = 0

for j in range(0,26):
    for k in range(0,15):
        if N == 4 * j + k * 7:
            hantei = 1
            break

if hantei == 0:
    print("No")

else:
    print("Yes")

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

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

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

flag = False

for x in range(1+n//4):

    if (n-4*x)%7 == 0:
        flag = True
        break

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

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

Solution (Python):
n = int(input())
if n % 7 == 0 or (n >= 8 and n % 7 ==1) or n % 7 ==4 or (n >= 12 and n % 7 ==5):
  print('Yes')
elif n % 4 == 0:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):

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

Solution (Python):
n = int(input())
i = 0
j = 0
k = 0
while k < 100:
    while k < 100:
        k = i * 4 + j * 7
        if k == n:
            print("Yes")
            exit()
        j += 1
    j = 0
    k = i * 4 + j * 7
    i += 1
print("No")

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

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

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

        
        
print('No')

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

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

        if i * 4 + j * 7 > n:
            break
print('No')

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

N = int(input())

for i in range(15):
  if (N - 7 * i) % 4 == 0 and (N - 7 * i) / 4 >= 0:
    print("Yes")
    sys.exit()
    
print("No")

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

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

if check is False:
    print('No')

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

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

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

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())
 
donuts=N//7
ans="No"

for i in range(donuts,-1,-1):
  left_price=N-7*i
  if left_price%4==0:
    ans="Yes"
    break
 
print(ans)

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

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

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

ans = 'No'

for i in range(0, 100, 4):
  for j in range(0, 100, 7):
    if (i+j == N):
      ans = 'Yes'
      break
print(ans)

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

Solution (Python):
N = int(input())
M = [4*i+7*j for i in range(30) for j in range(20)]

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

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

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

for i in range(100):
    if (n - 4 * i) < 0:
        break
    elif (n - 4 * i) % 7 == 0:
        print("Yes")
        exit()

print("No")

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

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

cake_max = int(N / 4)
price_tmp = N

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

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

l=[4*x+7*y for x in range(26) for y in range(16)].count(n)
print('Yes' if l!=0 else 'No')

Solution (Python):
def main():
    N = int(input())  
    for d in range(20):
        for c in range(25):
            total = d * 7 + c * 4
            if total == N:
                print('Yes')
                return

    print('No')


if __name__ == '__main__':
    main()

Solution (Python):
l = [x*4 + y*7 for x in range(100) for y in range(100)]
n = int(input())
ans = 'Yes' if n in l else 'No'
print(ans)

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


while (True):
    if N % 7 == 0:
        print("Yes")
        break
    elif N < 0:
        print("No")
        break
    else:
        N -= 4
        if N == 0:
            print("Yes")
            break

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

for i in range(26):
    for j in range(14):
        if n == (i * 4) + (j * 7):
            answer = 'Yes'

print(answer)

Solution (Python):
r=range;l=[4*i+7*j for i in r(26)for j in r(15)]
print("NYoe s"[int(input())in l::2])

Solution (Python):
n = int(input())
c = [i for i in range(0,n+1) if i%4 == 0]
d = [j for j in range(0,n+1) if j%7 == 0]
for x in range(len(c)):
    for y in range(len(d)):
        if c[x] + d[y] == n:
            print("Yes")
            exit()
print("No")

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

itr = max([n//4+1,n//7+1])
for i in range(itr):
	for j in range(n):
		summ = 4*i + 7*j
		if summ == n:
			print("Yes")
			quit()
print("No")

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

Solution (Python):

n = int(input())

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

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

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

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

c = 0
X = N//4 +1

for i in range(X):
    if N - i*4 <0:
        break
    if (N - i*4) == 0 or (N-i*4)%7 == 0:
        print("Yes")
        exit()
print("No")

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

A = (4, 7)

M = N
ans = 'No'
while True:
  if M % A[1] == 0:
    ans = 'Yes'
    break
  else:
    M -= A[0]
    if M < 0:
      break
      
print(ans)

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

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

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    N = int(input())
    for i in range(100):
        for j in range(100):
            if i*4 + 7*j == N:
                print('Yes')
                return
    print('No')
    
if __name__ == '__main__':
    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(0)
print('No')

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

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

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

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

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

Solution (Python):
n=int(input())
b=[]
for i in range(15):
    for j in range(12):
        b.append(i*4+j*7)
print("NYoe s"[n in b::2])

Solution (Python):

n = int(input())

ok = False
for a in range(0, 100):
    for b in range(0, 100):
        if a * 4 + b * 7 == n:
            ok = True
print("Yes" if ok else "No")

Solution (Python):
N = int(input())  
b = 1 
for i in range(25):  
    b |= b << 4
for i in range(15):  
    b |= b << 7
ans = "Yes" if (b >> N) & 1 else "No"
print(ans)

Solution (Python):
N = int(input())  
b = 1 
for i in range(25):  
    b |= b << 4
for i in range(15):  
    b |= b << 7
ans = "Yes" if (b >> N) & 1 else "No"
print(ans)

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

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):
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
            break
    else:
        continue
    break

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

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

Solution (Python):
n = int(input())
tf = False
for i in range(0, 26):
    for j in range(0,16):
        if 4 * i + 7*j == n:
            print("Yes")
            tf = True
            break
    else:
        continue
    break
    
if not tf:
    print("No")

Solution (Python):
def main35():
    num = int(input())
    if num == 98:
        print("Yes")
    for i in range(14):
        kazu = i*7
        while(kazu<=100):
            if kazu == num:
                print("Yes")
                return
            kazu = kazu + 4
    print("No")

if __name__ == "__main__":
    main35()

Solution (Python):

f = []

for i in range(100):
    for j in range(100):
        if i * 4 + j * 7 not in f:
            f.append(i * 4 + j * 7)

n = int(input())

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

Solution (Python):
def candd(n):
  count = 0
  for i in range(25):
    for s in range(15):
      answer = 4*i + s*7
      if answer == n:
        count +=1
  if count >0:
    print('Yes')
  else:
    print('No')

a = int(input())
candd(a)

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

bool = False

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

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

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

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

flag = 0
for i in range(26):
    for j in range(15):
        if 4*i+7*j == N:
            flag = 1
            break
if flag == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
count = 0
for cake in range(0,n+1,4):
    for donatsu in range(0,n+1,7):
        if donatsu + cake == n:
            count += 1
print("Yes") if count >= 1 else print("No")

Solution (Python):
M=set(4*c + 7*d for c in range(26) for d in range(15))
N=int(input())
if N in M:
  ans="Yes"
else:
  ans="No"
print(ans)

Solution (Python):
N=int(input())
ans="No"
if N==4 or N>=7:
  for c in range(26):
    for j in range(15):
      if 4*c+7*j==N:
        ans="Yes"
        break
print(ans)

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

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

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

print('No')

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

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

d = 0
ans = 'No'
while d*7 <= N:
    if (N-d*7)%4 == 0:
        ans = 'Yes'
        break
    d += 1

print(ans)

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()
        elif i*4+j*7 > N:
            break

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

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

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

cake = 4
donut = 7

ac = False

for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
            break

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

Solution (Python):
def total_price(x, y, N):
    if (x + y) == N:
        return True
    elif x + y > N:
        return False
    ret1 = total_price(x + 4, y, N)
    ret2 = total_price(x, y + 7, N)
    return ret1 or ret2

N = int(input())
if total_price(0, 0, N):
    print("Yes")
else:
    print("No")

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

Solution (Python):
N = int(input())
ans = False
for i in range(26):
  for j in range(15):
    if i*4+j*7 == N:
      ans = True
      break
  else:
    continue
  break
if ans:
  print('Yes')
else:
  print('No')

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    n, k = LI()
    if n % k:
        print(1)
    else:
        print(0)
    return


def B():
    n = II()
    dp = [0] * (100 + 1)
    dp[4] = 1
    dp[7] = 1
    for i in range(8,n + 1):
        if dp[i - 4] or dp[i - 7]:
            dp[i] = 1
    print(["No", "Yes"][dp[n]])
    return


def C():
    return


def D():
    return


if __name__ == '__main__':
    B()

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

Solution (Python):
list47=set([0,4,7,8,11,12,14,15,16,18,19,20,21,22,23,24,25,26,27])
n=int(input())
print('Yes' if (n%28) in list47 else 'No')

Solution (Python):
import sys

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

if __name__ == "__main__":
    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

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

if __name__ == "__main__":
    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())
y = 0
ans = "No"
while 7*y <= N:
    if (N-7*y)%4 == 0:
        ans = "Yes"
        break
    y += 1
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('Yes' if N % 11 == 0 else 'No')

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

def dfs(cost):
    if cost == N:
        return 9999
    elif cost > N:
        return -1
    return max(dfs(cost+4), dfs(cost+7))

x = dfs(0)
print('No') if x < 0 else print('Yes')

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

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

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

ans = False
for i in range(27):
    for j in range(20):
        if n == 4*i + 7*j:
            ans = True

if ans:
    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):
a = int(input())

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

Solution (Python):
import sys

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")
            sys.exit()
print("No")

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

res='No'





if t>3:
	for i in range(26):
		for j in range(16):
			if t==4*i+7*j:
				res='Yes'

print(res)

Solution (Python):
N = int(input())
tmp = []
for i in range(10):
  for j in range(10):
    solve = (4*(i+1))+(7*(j+1))
    if solve <= 100:
      tmp.append(solve)
multiples = sorted(list(set(tmp)))
if N % 4 == 0 or N % 7 == 0 or N in multiples:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
multiple_4 = [x*4 for x in range(101) if x >= 1 and x <= 25]
multiple_7 = [x*7 for x in range(101) if x >= 1 and x <= 14]
multiple_4_7 = [x*4+7 for x in range(101) if x >= 1 and x <= 23]
multiple_7_4 = [x*7+4 for x in range(101) if x >= 1 and x <= 23]
tmp = []
for i in range(10):
  for j in range(10):
    solve = (4*(i+1))+(7*(j+1))
    if solve <= 100:
      tmp.append(solve)
multiple_other = sorted(list(set(tmp)))
if N in multiple_4 or N in multiple_7 or N in multiple_4_7 or N in multiple_7_4 or N in multiple_other:
  print("Yes")
else:
  print("No")

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

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

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

Solution (Python):
N=int(input())
a=int(N/4)
b=int(N/7)

flag=False

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

Solution (Python):
N = int(input())
x = int(N/4)
y = int(N/7)
cnt = 0

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

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

if n<4:
    print("No")
    exit()

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

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

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

if n<4:
    print("No")
    exit()

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

ans=[]
for i in range(0,a+1):
    for j in range(0,b+1):
        if i*4+j*7==n:
            print("Yes")
            exit()
print("No")

Solution (Python):
N = int(input())
if N % 4 == 0:
    print('Yes')
    exit(0)
if N % 7 == 0:
    print('Yes')
    exit(0)

for j in range(0,101):
    if N - 4 * j > 0:
        if (N - 4 * j) % 7 == 0:
            print('Yes')
            exit(0)
    else:
        break
print('No')

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

flg = 0

if N>7:
    for i in range(N//7+1):
        r = N-7*i
        if r%4==0:
            flg = 1
        
else:
    if N==4 or N==7:
        flg = 1

if flg==1:
    print('Yes')
else:
    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):
a = int(input())
for i in range(25):
    for j in range(15):
        if a - (4 * i + 7 * j) == 0:
            print("Yes")
            exit()
print("No")

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

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

for i in range(round(n/4)+1):
    for j in range(round(n/7)+1):
        ans = i*4 + j*7
        if ans == n:
            c += 1        
if c == 0:
    print("No")
else:
    print("Yes")

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

n = int(input())  

cake = n // 4 + 1   
donut = n // 7 + 1  

count = 0

for c_i in range(cake):
  if count == 1:
    break
  else:
    for d_i in range(donut):
      if n == c_i * 4 + d_i * 7:
        count = 1
        break

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

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

Solution (Python):


n = int(input())


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

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

for i in range(50):
  for j in range(20):
    b.add(4*i+7*j)

if a in b:
  print("Yes")
else:
  print("No")

Solution (Python):



def read_h(conv=int):
    return map(conv, input().split())


def read_v(n, conv=int):
    return [conv(input()) for _ in range(n)]


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

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

    print('No')


if __name__ == '__main__':
    main()

Solution (Python):



def read_h(conv=int):
    return map(conv, input().split())


def read_v(n, conv=int):
    return [conv(input()) for _ in range(n)]


def main():
    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')


if __name__ == '__main__':
    main()

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

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

Solution (Python):
n = int(input())
ans = 'No'
for x in range(25):
    for y in range(14):
        if 4 * x + 7 * y == n:ans = 'Yes'
print(ans)

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

small_cake = 25
large_cake = 14

counter = 0
for s in range(small_cake):
    for l in range(large_cake):
        if n == 4 * s + 7 * l:
            counter += 1

if counter >0:
    print('Yes')
else:
    print('No')

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

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

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

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





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

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

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

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

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

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

Solution (Python):
import math

x = int(input())

flg = False
for i in range(math.floor(x / 4) + 1):
  for j in range(math.floor(x / 7) + 1):
      if x - i * 4 - j * 7 == 0:
        flg = True
        break
if flg:
  print('Yes')
else:
  print('No')

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

for i in range(N+1):
  if i % 4 == 0 and (N-i) % 7 == 0:
    ans = "Yes"

print(ans)

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

if n % 7 == 0 or n % 4 == 0:
    print("Yes")
elif n >= 4 and n % 7 == 4:
    print("Yes")
elif n >= 8 and n % 7 == 1:
    print("Yes")
elif n >= 12 and n % 7 == 5:
    print("Yes")
elif n >= 16 and n % 7 == 2:
    print("Yes")
elif n >= 20 and n % 7 == 6:
    print("Yes")
elif n >= 24 and n % 7 == 3:
    print("Yes")
else:
    print("No")

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

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

def cd(n):
    c = n // 4
    for i in range(c+1):
        x = n - i * 4
        if x == 0:
            return print("Yes")
        elif x % 7 == 0:
            return print("Yes")

    return print("No")

cd(n)

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

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

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

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

Solution (Python):
n = int(input())
k = n // 4
r = n % 4
if r == 0:
  print("Yes")
elif r == 1:
  if k >= 5:
    print("Yes")
  else:
    print("No")
elif r == 2:
  if k >= 3:
    print("Yes")
  else:
    print("No")
else:
  if k >= 1:
    print("Yes")
  else:
    print("No")

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

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

for f in range(25):
    for s in range(15):
        if 4*f + 7*s == N:
            print('Yes')
            exit()

print('No')

Solution (Python):
n = int(input())
def func(n):
    p = 0
    while True:
        if 4*p > n:
            return 'No'
        q = 0
        while True:
            s = 4*p + 7*q
            if s > n:
                break
            elif s == n:
                return 'Yes'
            q += 1
        p += 1

print(func(n))

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

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