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.



Sample input:
11


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
N = int(input())
c = (N + (4 - N%4)) / 4
d = (N + (7 - N%7)) / 7
flag = False
 
for i in range(int(c)+1):
  for j in range(int(d)+1):
    total = 4*i + 7+j
    if total == N:
      flag = True
      
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
c = (N + (4 - N%4)) / 4
d = (N + (7 - N%7)) / 7
flag = False

for i in range(int(c)):
  for j in range(int(d)):
    total = 4*i + 7+j
    if total == N:
      flag = True
      
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n %4 == 0:
	print ("Yes")
	exit()
if n % 7 == 0:
	print ("No")
	exit()

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

Submission status: Wrong Answer

Solution code:
N=int(input())

if N%7==0 or N%4==0 or N%7%4==0 or N%4%7==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n%7%4 == 0 or n%4%7 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = 0

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

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

Submission status: Wrong Answer

Solution code:
def resolve():
    n = int(input())
    if n % 4 == 0 or n % 7 == 0 or n % 11 == 0 or (n % 11) % 4 == 0 or (n % 11) % 7 == 0:
        print("Yes")
    else:
        print("No")
        
resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())

dp = [0] * (n + 1)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

dp = [0] * (n + 1)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N=int(input())
if N%4==0 or N%7==0:
  print('Yes')
else:
  while 0<N:
    N-=7
    if N%4==0:
      print('Yes')
      break
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
if N%4==0 or N%7==0:
  print('Yes')
else:
  while 0<N:
    N-=7
    if N%4:
      print('Yes')
      break
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
for a in range(n//4):
  for b in range(n//7):
    if n == 4*a+7*b:
      print('Yes')
      break
print('No')

Submission status: Wrong Answer

Solution code:
cake = 4
donaut = 7
N = int(input())
count = 0

for i in range(0, 20):
	for k in range(0, 20):
		if N == cake * i + donaut * k:
			print(str(i) + ',' + str(k))
			count = 1
			break

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

Submission status: Wrong Answer

Solution code:
cake = 4
donaut = 7
N = int(input())
count = 0

for i in range(0, cake + 1):
	for k in range(0, donaut + 1):
		if N == cake * i + donaut * k:
			count += 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N%7 == 0:
    print("Yes")
elif N%4 == 0:
    print("Yes")
elif (N%7)%4 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def checker(N):
    r = N % 7
    if r == 0:
        return True 
    else :
        if r % 4 == 0:
            return True
    r = N % 4
    if r == 0:
        return True
    else :
        if r % 7 == 0:
            return True
    return False

N = int(input())
        
flag = checker(N)

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

Submission status: Wrong Answer

Solution code:
def checker(N):
    r = N % 7
    if r == 0:
        return True 
    else :
        if r % 4 == 0:
            return True
    r = N % 4
    if r == 0:
        return True
    
    return False

N = int(input())
        
flag = checker(N)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

check = False
if n < 4:
  check = False

elif n % 4 == 0 or n % 4 == 7:
  check = True

elif n % 7 == 0 or n % 7 == 4:
  check = True

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

Submission status: Wrong Answer

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

for i in range(1, 26):
    for j in range(1, 16):
        if(4*i+7*j==n):
            flg = True
            break
print("Yes" if flg else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(1, 26):
    for j in range(1, 16):
        if(4*i+7*j==n):
            print("Yes")
            break
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
import itertools
import sys

"""
1個4ドルのケーキX個と1個7ドルのドーナツY個
合計Nドルとなる買い方があるときはyes、逆はno

1<= N <=100
4 * X + 7 * Y = N
0<= X <= 25, 0<= Y <= 14
"""

N = int(input())
X = list(range(26))
Y = list(range(15))

for i, j in list(itertools.product(X, Y)):
  if 4 * i + 7 * j == N:
    print('yes')
    sys.exit()
print('no')

Submission status: Wrong Answer

Solution code:
import itertools

"""
1個4ドルのケーキX個と1個7ドルのドーナツY個
合計Nドルとなる買い方があるときはyes、逆はno

1<= N <=100
4 * X + 7 * Y = N
0<= X <= 25, 0<= Y <= 14
"""

N = int(input())
X = list(range(26))
Y = list(range(15))
no_count = 0
for i, j in list(itertools.product(X, Y)):
  if 4 * i + 7 * j == N:
    print('yes')
    break
  else:
    no_count += 1
if no_count == len(list(itertools.product(X, Y))):
  print('no')

Submission status: Wrong Answer

Solution code:
n=int(input())

flag=False

while(n>=0):
    n=n-4
    if n%7==0:
        flag=True
        break
    if n==0:
        flag=True

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

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
a=n
b=n
if n%4==0 or n%7==0:
	print("Yes")
	sys.exit()	
for k in range(0,n,4):
	a-=k
	if a%7==0:
		print("Yes")
		sys.exit()
for d in range(0,n,7):
	b-=d
	if b%4==0:
		print("Yes")
		sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
a=n
b=n
if n%4==0 or n%7==0:
	print("Yes")
	sys.exit()	
for k in range(0,n,4):
	print(k)
	a-=k
	if a%7==0:
		print("Yes")
		sys.exit()
for d in range(0,n,7):
	b-=d
	if b%4==0:
		print("Yes")
		sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
a=n
b=n
if n%4==0 or n%7==0:
	print("Yes")
	sys.exit()	
for k in range(1,n,4):
	a-=k
	if a%7==0:
		print("Yes")
		sys.exit()
for d in range(1,n,7):
	b-=d
	if b%4==0:
		print("Yes")
		sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
a=n
b=n
for k in range(n+1):
	a-=k*4
	if a%7==0:
		print("Yes")
		sys.exit()
for d in range(n+1):
	b-=d*7
	if b%4==0:
		print("Yes")
		sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0

for i in range(N):
    if (N - i*7) % 4 == 0:
        cnt += 1

print("Yes" if cnt > 0 else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 4 == 0 or N % 7 == 0:
    print("Yes")
    
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
counter = False
for n in range (0,10):
  for i in range (math.ceil((n+1) / 4) ):
    for j in range (math.ceil((n+1) / 7) ):
      #print(n, i,j)
      if i*4 + j*7 == n:
        counter = True
  if counter == True:
   print("Yes")
  else:
   print("No")
  counter=False

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
counter = False
for i in range (math.ceil(N / 4) ):
  for j in range (math.ceil(N / 7) ):
    if i*4 + j*7 == N:
      counter = True
if counter == True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
for i in range(100+1):
    if 4*i>N:
        break
    for j in range(100+1):
        if 7*i>N:
            break
        if 4*i+7*j==N:
            cnt += 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if (N%4)%7==0 or (N%7)%4==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

counter = 0
max = int(n/4)
for i in range(max):
  for ii in range(max):
    if(n == i*7 + ii*4):
      counter = counter +1

if(counter >= 1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
#n, x  = map(int, input().split())
#h = list(map(int, input().split()))
#s = list(str(input()))

counter = 0
max = int(n/4)
for i in range(max):
  for ii in range(max):
    if(n == i*7 + ii*4):
      counter = counter +1

if(counter >= 1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
#n, x  = map(int, input().split())
#h = list(map(int, input().split()))
#s = list(str(input()))

counter = 0
max = int(n/4)
for i in range(max):
  for ii in range(max):
    if(n == i*7 + ii*4):
      counter = counter +1
print(counter)

Submission status: Wrong Answer

Solution code:
n = int(input())

c = 0

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

Submission status: Wrong Answer

Solution code:
n = int(input())

c = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
a=int(input())
print("Yes" if [4*x+11*y for x in range(101) for y in range(101)].count(a) else "No")

Submission status: Wrong Answer

Solution code:
a=int(input())
print("Yes" if [4*x+11*y for x in range(100) for y in range(15)].count(a) else "No")

Submission status: Wrong Answer

Solution code:
a=int(input())
print("Yes" if [4*x+11*y for x in range(26) for y in range(9)].count(a) else "No")

Submission status: Wrong Answer

Solution code:
a=int(input())
print("Yes" if [4*x+11*y for x in range(26) for y in range(9)].count(a) else "NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = "No"
for i in range(n // 4):
    if (n - 4 * i) % 7 == 0:
        ans = "Yes"
        break
    elif (n - 7 * i) % 4 == 0:
        ans = "Yes"
        break
    else:
        continue
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = "No"
for i in range(n // 4):
    if (n - 4 * i) % 7 == 0:
        ans = "Yes"
        break
    else:
        continue
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

money = False
if N % 4 == 0 or N % 7 == 0:
    money = True

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

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

Submission status: Wrong Answer

Solution code:
N = input()
ans = 'Yes'
if N.isdecimal():
    ans = 'No'
    N = int(N)

    A = N % 4
    B = N % 7
    C = N % 11

    if A == 0:
        ans = 'Yes'
    elif B == 0:
        ans = 'Yes'
    elif C == 0:
        ans = 'Yes'
    elif C == 4:
        ans = 'Yes'
    elif C == 7:
        ans = 'Yes'
    elif C == 8:
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
N = input()
ans = 'No'
if N.isdecimal():
    N = int(N)

    A = N % 4
    B = N % 7
    C = N % 11

    if A == 0:
        ans = 'Yes'
    elif B == 0:
        ans = 'Yes'
    elif C == 0:
        ans = 'Yes'
    elif C == 4:
        ans = 'Yes'
    elif C == 7:
        ans = 'Yes'
    elif C == 8:
        ans = 'Yes'
    print(ans)

Submission status: Wrong Answer

Solution code:
N = input()
ans = 'No'
if N.isdecimal():
    N = int(N)

    A = N % 4
    B = N % 7
    C = N % 11

    if A == 0:
        ans = 'Yes'
    elif B == 0:
        ans = 'Yes'
    elif C == 0:
        ans = 'Yes'
    elif C == 4:
        ans = 'Yes'
    elif C == 7:
        ans = 'Yes'
    elif C == 8:
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 'No'
A = N % 4
B = N % 7
C = N % 11

if A == 0:
    ans = 'Yes'
elif B == 0:
    ans = 'Yes'
elif C == 0:
    ans = 'Yes'
elif C == 4:
    ans = 'Yes'
elif C == 7:
    ans = 'Yes'
elif C == 8:
    ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 'No'
A = N % 4
B = N % 7
C = N % 11

if A == 0:
    ans = 'Yes'
elif B == 0:
    ans = 'Yes'
elif C == 0:
    ans = 'Yes'
elif C == 4:
    ans = 'Yes'
elif C == 7:
    ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 4 == 0 or N % 7 == 0 or N % 11 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
print("YNeos"[N not in [a+b for a in range(4,N+1,4) for b in range(7,N+1,7)]::2])

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = "No"

while N > 0:
  if N % 4 == 0:
    ans = "Yes"
    break
  else:
    N = N - 7
    
    
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
flag = False
while True:
    if N < 4:
        break
    if N % 4 == 0:
        flag = True
        break
    N -= 7
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
print(any([(N - 4*i) % 7 == 0 for i in range((N+3)//4 + 1)]))

Submission status: Wrong Answer

Solution code:
N = int(input())
print(any([(N - 4*i) % 7 == 0 for i in range(N//4 + 1)]))

Submission status: Wrong Answer

Solution code:
N = int(input())
print(any([(N - 4*i) % 7 == 0 for i in range(N//4)]))

Submission status: Wrong Answer

Solution code:
N = int(input())

list_aaa =[]

for i in range(26):
    for j in range(26):
        list_aaa.append((i*4)+(j*7))
list_aaa = sorted(list_aaa)

print(list_aaa)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
if n % 4 == 0 or n % 7 == 0:
    print("Yes")
elif n % 4 == 7 or n % 7 == 4:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

#cake   : 4 dollar
#donuts : 7 dollar

cnt = "No"

if n % 4 == 0:
  cnt = "Yes"
  
if n % 7 == 0:
  cnt = "Yes"
  
# 7 * 14 = 98
for i in range(1,14):
  if( 7 * i > n ):
    break
  else:
    if( (n-7*1) % 4 == 0):
      cnt = "Yes"
      
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
import heapq
import sys
from collections import Counter
import datetime
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN

#N,K=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

N=int(input())

for i in range(0,N//4):
    if (N-4*i)%7==0:
        print('Yes')
        sys.exit()
        
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
for i in range(0,26):
  for k in range(0,15):
    if N == 4*i + 7*k:
      print('Yes, i=',i,', k=',k)
      exit()
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if (N % 7) % 4 == 0 or (N % 4) % 7 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = N // 4
donuts = N // 7
calcs = False
for i in range(cake + 1):
  for j in range(donuts + 1):
    if i * 4 + j * 7 == N:
      calcs = True
      break
print('Yes' if calcs is True else False)

Submission status: Wrong Answer

Solution code:
from math import ceil

N = int(input())
is_possible = False

for i in range(ceil(N/4)):
    for j in range(ceil(N/7)):
        if 4*i+7*j == N:
            is_possible = True

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

Submission status: Wrong Answer

Solution code:
from math import ceil

N = int(input())
is_possible = False

for i in range(ceil(N/4)):
    for j in range(ceil(N/7)):
        if 4*i+7*j == N:
            is_possible = True

if is_possible:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
lst_4 = [x for x in range(4, 101, 4)]
lst_7 = [x for x in range(7, 101, 7)]
lst = []
for i in lst_4:
    for j in lst_7:
        lst.append(i + j) 

ans = [x for x in lst if x <= 100]
print('Yes' if n in ans else 'No')

Submission status: Wrong Answer

Solution code:
n=int(input())
num=[4, 7, 8, 11, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 28, 29, 32, 33, 35, 36, 37, 39, 40, 42, 44, 46, 48, 49, 51, 52, 53, 55, 56, 59, 60, 62, 63, 64, 66, 67, 68, 70, 72, 73, 74, 76, 77, 80, 81, 84, 88, 91, 92, 95, 96, 98, 99, 100]
if n in num:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
num=[1, 2, 3, 5, 6, 9, 10, 13, 17, 19, 23, 27, 30, 31, 34, 38, 41, 43, 45, 47, 50, 54, 57, 58, 61, 65, 69, 71, 75, 78, 79, 82, 83, 85, 86, 87, 89, 90, 93, 94, 97]
if n in num:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# coding: utf-8

n = int(input())

for i in range(n+1):
    d = 4 * i
    if (n - d) % 7 == 0:
        print("Yes")
        exit(0)

print("No")

Submission status: Wrong Answer

Solution code:
# coding: utf-8

n = int(input())

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

print("No")

Submission status: Wrong Answer

Solution code:
#105 b-cakes and donuts
n=int(input())
cake=4
donuts=7
cake_donuts=cake+donuts
x=n%cake_donuts
ans="No"
if x==0 or x==4 or x==7:
    ans="Yes"
if n%4==0 or n%7==0:
    ans="Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
#105 b-cakes and donuts
n=int(input())
cake=4
donuts=7
cake_donuts=cake+donuts
x=n%cake_donuts
ans="No"
if x==0 or x==4 or x==7:
    ans="Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
print("Yes" if N%4%7==0 or N%7%4==0 else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

else:
    if (n-n//7*7)%4==0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
for i in range(math.ceil(n / 4)):
    if ((n - i * 4) / 7) % 1 == 0:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
for i in range(math.floor(n / 4)):
    if ((n - i * 4) / 7) % 1 == 0:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
N =int(input())

if N % 4 == 0 or N % 7 == 0 or N % 11 == 0 or N % 4 == 7 or N % 7 == 4:
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N%7 == 4:
    print("Yes")
elif N%7==0:
    print("Yes")
elif N%4==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
for i in range(math.ceil(N / 7)):
    res = N - 7 * i
    if res % 4 == 0:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
#coding:utf-8
n = int(input())

#全探索
for i in range(n//7):
    for j in range(n//4):
        if 7*i + 4*j == n:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

Solution code:
#coding:utf-8
n = int(input())

#全探索
for i in range(n//4):
    for j in range(n//7):
        if 4*i + 7*j == n:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(20):
  if (n-7*i)%4==0:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())

is_buy = 'No'
for a in range(N//4):
    for b in range(N//7):
        if 4*a + 7*b == N:
            is_buy = 'Yes'
            break
print(is_buy)

Submission status: Wrong Answer

Solution code:
N=int(input())

price = 0
is_buy = False
if N % 4 == 0 or N % 7 == 0 or N % 11 == 0:
    print('Yes')
else:
    while price <= N:
        price += 4
        if N == price:
            is_buy = True
            break
        price += 7
        if N == price:
            is_buy = True
            break
    if is_buy:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())

price = 0
is_buy = False
if N % 4 == 0 or N % 7 == 0 or N % 11 == 0:
    print('Yes')
else:
    while price < N:
        price += 4
        if N == price:
            is_buy = True
            break
        price += 7
        if N == price:
            is_buy = True
            break
    if is_buy:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
i=0
while True:
    j=0
    while True:
        if i*4+j*7==n:
            print("Yes")
            exit()
        j+=1
        if i*4+j*7>n:
            break
    i+=1
    if i*4+j*7>n:
        break
print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
for s in range(n//4+1):
    for t in range(n//7+1):
        if 4*s+7*t==n:
            print("Yes")
            break
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
for s in range(n//4+1):
    for t in range(n//7+1):
        if 4*s+7*t==n:
             print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

if n%4==7 or n%4==3 or n%7==4 or n%7==1 or n%4==0 or n%7==0:
    print("Yes")
    
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

if n%4==7 or n%4==3 or n%7==4 or n%7==3 or n%4==0 or n%7==0:
    print("Yes")
    
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n==0:
    print("No")
    exit()

if n%4==7 or n%7==4 or n%4==0 or n%7==0:
    print("Yes")
    
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

if n%4==7 or n%7==4 or n%4==0 or n%7==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
d=0
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            d+=1
print(d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

flg = False
for a in range(round(N / 4)):
    for b in range(round(N / 7)):
        if a * 4 + b * 7 == N:
            flg = True

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

Submission status: Wrong Answer

Solution code:
n=int(input())
j=n%4
h=n%7
if n%4==0:
  print("Yes")
elif n%7==0:
  print("Yes")
elif j%7==0:
  print("Yes")
elif h%4==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 4 == 0 or N % 7 == 0 or N % 11 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 4 == 0 or n % 7 == 0:
  print("Yes")
elif n % (4 + 7) == 0:
  print("Yes")
elif n % 4 % 7 == 0 or n % 7 % 4 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

q,r = divmod(n, 7)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

q,r = divmod(n, 7)

if n%7 == 0 or n%4 == 0:
  print('Yes')
elif r%4 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
string = "No"
for i in range(1, n+1):
        for j in range(1, n+1):
            if n == 4*i + 7*j :
                string = "Yes"
                break

print(string)

Submission status: Wrong Answer

Solution code:
n = int(input())
a4 = [4*i for i in range(50//4+1)]
a7 = [7*i for i in range(50//7+1)]

ans = 'No'
for x in a4:
    for y in a7:
        if x+y == n:
            ans = 'Yes'
            break
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

for y in range(1, 15):
    x = N - 7 * y
    if x < 0:
        break
    if x % 4 == 0:
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

for y in range(1, 15):
    x = (N - 7 * y) / 4
    if x > 0 and x.is_integer():
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
for i in range(26):
  for j in range(14):
    if i+j==N:
      print('Yes')
      break
  else:
    continue
  break
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
m_cn = n // 4
for i in range(m_cn):
  r = n - 4 * i
  if r % 7 == 0:
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

Solution code:
A = int(input())
Flag = False
for i in range(1,(A//4)+1):
  for j in range(1,(A//7)+1):
    if A == 3:
      break;
    elif 4*i + 7*1 == A:
      Flag = True
if Flag:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = False
for i in range(int(n/4)):
    for j in range(int(n/7)):
        if i==0 and j==0:
            continue
        if n%((4*i)+(7*j)) == 0:
            flag = True
            break
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A = int(input())
Flag = False
for i in range(1,(A//4)+1):
  for j in range(1,(A//7)+1):
    if 4*i + 7*j == A:
      Flag = True
if Flag:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n%4==0 or n%7==0 or n%11==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A = int(input())
if (A%4 == 3 or A%4 == 0 or A%7 == 4 or A%7== 0) and A != 3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
A = int(input())
if (A%4 == 3 or A%4 == 0 or A%7 == 0) and A != 3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
A = int(input())
if (A%4 == 3 or A%4 == 0) and A != 3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n = INT()
    if ((n % 11) % 7) % 4 == 0:
    	print('Yes')
    else:
    	print('No')

if  __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n = INT()
    if (n % 4) % 7 == 0:
    	print('Yes')
    else:
    	print('No')

if  __name__=='__main__':
    main()