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())
if N % 4 == 7:
  print('YES')
elif N % 4 ==0:
  print('YES')
elif N%7 ==0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
Y = range(0, round(N / 7))
x = [(N - 7 * y) / 4 for y in Y]
xx = np.round(x)
A = x-xx
if 0 in A:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
Y = range(1, round(N / 7))
x = [(N - 7 * y) / 4 for y in Y]
xx = np.round(x)
A = x-xx
if 0 in A:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = "No"
for i in range(N//4):
    if (N - i * 4) % 7 == 0:
        ans = "Yes"
        break

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def abc():
    n = int(input())
    if (n - (n // 4) * 4) % 7 == 0:
        print('Yes')
        return
    if (n - (n // 7) * 7) % 4 == 0:
        print('Yes')
        return
    print('No')


abc()

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = "No"
while N > 0:

    if N % 4 == 0:
        ans = "Yes"
        break

    N -= 7

print (ans)

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

Submission status: Wrong Answer

Solution code:
n= int(input())
a=4
b=7
d= n//a
if n % b ==0 or n % a ==0:
    print("Yes")
elif n < a:
    print("No")
else:
    for x in range(d+1):
        for y in range(d+1):
            nn= a*int(x) + b*int(y)
            if nn == n:
                print("Yes")
                break
            else:
                continue

            if nn > n:
                print("No")
                break
            else:
                continue

        if nn == n:
            break
        elif nn > n:
            print("No")
            break
        else:
            continue

Submission status: Wrong Answer

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

max_4 = int(N / 4)
max_7 = int(N / 7)

yes = 0

for i in range(1,max_4+1):
    for j in range(1,max_7+1):
        if i*4 + j*7 == N:
            yes = 1
            break

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

Submission status: Wrong Answer

Solution code:
n = int(input())
m = (n // 7) * 7
if m == n or n == 4 or n == 12 or n == 20:
    print("Yes")
elif n - m <= n // 7:
    print("Yes")
else:
     print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
m = (n // 7) * 7
if m == n:
    print("Yes")
elif n == 4:
    print("Yes")
elif n - m <= n // 7:
    print("Yes")
else:
     print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
m = (n // 7) * 7
print(m)
if m == n:
    print("Yes")
elif n - m <= n // 7:
    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 or n%7%4 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())


ans=False

if n%7==0:
    ans=True


for i in range((int(n/7))):
    if (n-i*7)%4==0:
        ans=True
        

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

Submission status: Wrong Answer

Solution code:
n=int(input())


ans=False

if n%7==0:
    ans==True


for i in range((int(n/7))):
    if (n-i*7)%4==0:
        ans=True
        

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
while N > 7:
    N = N - 7
if N % 4 == 0:
    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('Yes')
    exit

if N % 11 == 0:
    print('Yes')

print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

cake_price = 4
donut_price = 7
sum_price = 0

flag = 0
cake_num = 0
donut_num = 0
while sum_price < N:
  while sum_price < N:
    sum_price = cake_price * cake_num + donut_price * donut_num
    donut_num += 1
    if sum_price == N:
      flag = 1
  cake_num += 1
  if sum_price == N:
      flag = 1
  
if flag == 0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
N=int(input())
upper=N//7
flag=False
for i in range(upper):
        for j in range(upper):
                if 7*i+4*j==N:
                        flag=True
                        break

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) or (N%11)-4 or (N%11)-7 == 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:
import sys
N = int(input())
for i in range(1,N):
    for j in range(0,100,7):
        for k in range(4,100,4):
            if j + k == N:
                print('Yes')
                sys.exit()
            elif j + k > N:
                break
print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

if n%4 == 0 or n%7 == 0:
	print("yes")
elif n%11 == 0 or n >= 21:
	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%11 == 0:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
for x in range(N // 4 + 1):
  answer = 'no'
  for y in range(N // 7 + 1):
    if 4 * x + 7 * y == N:
      answer = 'yes'
      break
  if answer == 'yes':
    break
print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())
for x in range(100 // 4 + 1):
  answer = 'no'
  for y in range(100 // 7 + 1):
    if 4 * x + 7 * y == N:
      print('yes')
      answer = 'yes'
      break
  if answer == 'yes':
    break
print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main(N):
  
    CP = 4
    DP = 7
    
    if N <= 3:
        return "No"
    
    for i in range(100):
        for j in range(100):
            if (CP * i + DP * j) == N:
                print(i,j)
                return "Yes"
    return "No"

N = int(input())
print(main(N))

Submission status: Wrong Answer

Solution code:
def Cakes_and_Donuts(N):
  
    CP = 4
    DP = 7
    
    if N <= 3:
        return "No"
    
    for i in range(26):
        for j in range(15):
            if (CP * i + DP * j) == N:
                return "Yes"
    return "No"
  
  
N = int(input())
Cakes_and_Donuts(N)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())

x=n//4
y=n//7

print("yes" if len([n-4*a-7*b for b in range(y+1) for a in range(x+1) if n-4*a-7*b==0])!=0 else "no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

c_max = N //4
d_max = N //7

for i in range(c_max):
    for j in range(d_max):
        temp = 4*i + 7*j

        if temp == N:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

n = N //4

for i in range(n):
    for j in range(n):
        temp = 4*i + 7*j

        if temp == N:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

def cakes_and_donuts(N=N):
  if N % 4 ==0 and N % 7 ==0:
    return 'Yes'  
  max_7_num = N//7
  max_4_num = N//4
  for i in range(max_7_num):
    for j in range(max_4_num):
      if 7*(i+1) + 4*(j+1) == N:
        return 'Yes'
  return 'No'

s = cakes_and_donuts(N)
print('{}'.format(s))

Submission status: Wrong Answer

Solution code:
N = int(input())

def cakes_and_donuts(N=N):
  if N < 4:
    return 'No'
  max_7_num = N//7
  max_4_num = N//4
  for i in range(max_7_num):
    for j in range(max_4_num):
      if 7*(i+1) + 4*(j+1) == N:
        return 'Yes'
  return 'No'

s = cakes_and_donuts(N)
print('{}'.format(s))

Submission status: Wrong Answer

Solution code:
N = int(input())

def cakes_and_donuts(N=N):
  max_7_num = N//7
  max_4_num = N//4
  for i in range(max_7_num):
    for j in range(max_4_num):
      if 7*(i+1) + 4*(j+1) == N:
        print(i+1, j+1)
        return 'Yes'
  return 'No'

s = cakes_and_donuts(N)
print('{}'.format(s))

Submission status: Wrong Answer

Solution code:
N = int(input())
def cakes_and_donuts(N=N):
  max_7_num = N//7
  max_4_num = N//4
  for i in range(max_7_num):
    for j in range(max_4_num):
      if 7*(i+1) + 4*(j+1) == N:
        return 'Yes'
  return 'No'

s = cakes_and_donuts(N)
print('{}'.format(s))

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = False
for i in range(1,n+1):
    if i%4 == 0 and (n-i)%7 == 0:
        flag = True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = False
for i in range(1,n+1):
    if i%4 == 0 and (n-i) == 0:
        flag = True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
price = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
 
cake = 4
dou = 7
dec = False
 
for i in range(100):
    for j in range(100):
        price = cake * i + dou * j
        if price == N:
            print("Yes")
            dec = True
            break
if not dec:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

cake = 4
dou = 7
dec = False

for i in range(26):
    for j in range(15):
        price = cake * i + dou * j
        if price == N:
            print("Yes")
            dec = True
            break
if not dec:
    print("No")

Submission status: Wrong Answer

Solution code:
n =int(input())
for i in range(1,16):
    if int(n%(i*7))%4==0:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np

def main():
	
	N = int(input())
	
	if N % 4 == 0 or N % 7 == 0 or N % 11 == 0:
		print("Yes")
	elif (N % 4) % 7 == 0 or (N % 7) % 4 == 0:
		print("Yes")
	else:
		print("No")
	
	
	
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np

def main():
	
	N = int(input())
	
	if N % 4 == 0 or N % 7 == 0:
		print("Yes")
	elif (N % 4) % 7 == 0 or (N % 7) % 4 == 0:
		print("Yes")
	else:
		print("No")
	
	
	
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
n=int(input())
 
if n%4==0 or n%4==7 or n%4==11 or n%7==0 or n%7==4 or n%7==11 or n%11==0 or n%11==7 or n%11==4:
  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 or n%11==4 or n%11==7:
  print('Yes')
else:
  n_m=n%11
  if n_m%4==0 or n_m%7==0 or n%11==4 or n%11==7:
    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 or n%11==4 or n%11==7:
  print('Yes')
else:
  n_m=n%11
  if n_m%4==0 or n_m%7==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 or n%11==4 or n%11==7:
  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())

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

print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S=0
while S<N:
    S=S+4
if S==N:
    print('Yes')
else:
    while S<N:
        S=S+7
    if S==N:
        print('Yes')
    else:
         print('No')

Submission status: Wrong Answer

Solution code:
answer=0
a=int(input())

for i in range(a):
    for j in range(a):
        sum=i*4+j*7
        if sum==a:
            answer+=1
print(answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
print('Yes' if n > 3 and (n % 4 in (0, 3)) else 'No')

Submission status: Wrong Answer

Solution code:
N = int(input())
bool1 = False

for i in range(25):
	for j in range(15):
		#print(4*i + 7*j, N)
		if 4*i + 7*j == N:
			print("Yes")
			bool1 = True
			break

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

Submission status: Wrong Answer

Solution code:
N = int(input())
bool1 = False
for i in range(25):
	for j in range(15):	
		if 4*i + 7*j == N:
			print("Yes")
			bool1 = True
			break
		break

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

Submission status: Wrong Answer

Solution code:
N = int(input())

for i in range(25):
	for j in range(15):	
		if 4*i + 7*j == N:
			print("Yes")
			bool1 = True
			break
		break
		if not bool1 == True:
			print("No")

Submission status: Wrong Answer

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

for a in range(N):
    if a%4 == 0 and (N-a)%7 == 0:
        print ('Yes')
        sys.exit()
print ('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

check = 0
for n in range(N // 4):
    if (N - 4 * n) % 7 == 0:
        check = 1
        break

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

x=int(input())

ans = 0
for i in range(101):
  for j in range(101):
    if x < 7:
      print("No")  
      sys.exit()
    elif x == (4*i + 7*j):
      print("Yes")
      sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 4:
    print('No')
for i in range(N//4):
    n = N - i * 4
    if n % 7 == 0:
        print('Yes')
        break
    
    if i == N // 4:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC 105 B
divisors = [4+i*7 for i in range(4)]
bound_num = max(divisors)
n = int(input())
yes=[i*4 + j*7 for i in range(6) for j in range(6)]
if n >= bound_num or n in yes:
    print("Yes")
else:
    print("No")
    
print(yes)

Submission status: Wrong Answer

Solution code:
#ABC 105 B
divisors = [4+i*7 for i in range(4)]
bound_num = max(divisors)
n = int(input())
yes=[i*4 + j*7 for i in range(4) for j in range(4)]
if n >= bound_num or n in yes:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int):
    ret = NO
    for i in range(N):
        if (N - (4 * i)) % 7 == 0:
            ret = YES
            break
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if n%7 != 0 and n%4 != 0 and n%11 != 0:
    for a in range(1, 25):
        for b in range(1, 14):
            if n%(7*b + 4*a) == 0:
                print('No')
                sys.exit()
else:
    print('No')
    sys.exit()
print('Yes')

Submission status: Wrong Answer

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

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

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
N=int(input())
if N>3:
  if (N%4)%3==0:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

can_buy = False
for i in range(math.ceil(n / 7)):
    r = n - 7 * i
    if r % 4 == 0:
        can_buy = True

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

Submission status: Wrong Answer

Solution code:
import itertools

N = int(input())

ans = 'No'
for a, b in itertools.product(range(4 + 1), range(7 + 1)):
    if 4 * a + 7 * b == N:
        ans = 'Yes'

print(ans)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
for i in range(0, N//4):
    for j in range(0, N//7):
        if(4*i + 7*j == N):
            print("Yes")
            exit()
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())
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())
C = int(N / 4)
D = int(N / 7)
ans = "No"
for c in range(1, C+1):
    for d in range(1, D+1):
        if c*4 + d*7 == N:
            ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 4 == 0 or N % 7 == 0 or N % 4 == 7 or N % 7 == 4:
    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 or N % 15 == 0 or N % 18 == 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:
#!/usr/bin/env python
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
n4 = int(n/4)
n7 = int(n/7)
ans = 'No'
if n%4 == 0:
    ans = 'Yes'
else :
    for i in range(n4+1):
         res = n - 4 * i
         for j in range(1,n7):
            if res%j == 0:
                ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
n4 = int(n/4)
n7 = int(n/7)
ans = 'No'
if n%4 == 0:
    ans = 'Yes'
else :
    for i in range(n4+1):
         res = n - 4 * i
         for j in range(1,n7+1):
            if res%j == 0:
                ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
for cake in range(n):
    for donut in range(n):
        if cake * 4 + donut * 7 == n:
            print("Yes")
            break
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:
import itertools

N = int(input())

if N%4 ==0 or N%7 ==0:
  print('Yes')
  exit()
else:
  i = itertools.product(range(N//4),range(N//7))
  
c = [a for a in i]

for i in c:
  if i[0]*4+i[1]*7 == N:
    print('Yes')
    exit()
  else:
    continue

print('No')

Submission status: Wrong Answer

Solution code:
import itertools

N = int(input())

if N%4 ==0 or N%7 ==0:
  print('Yes')
  exit()
else:
  i = itertools.product(range(1,N//4),range(1,N//7))

c = [a for a in i]

for i in c:
  if i[0]*4+i[1]*7 == N:
    print('Yes')
    exit()
  else:
    continue

print('No')

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

for i in range(0,n,7):
    if (n - i) % 4 == 0:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int):
    for i in range(1, N+1):
        if (i % 4 == 0) and ((N - i) % 7 ==0):
            return YES
    return NO


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    result = solve(N)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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())
print("Yes" if (n%4)//7 or (n%7)//4 else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
d=[n%4,n%7,n%11,n%15,n%18,n%25,n%26,n%30]
p="Yes" if 0 in d else "No"
print(p)

Submission status: Wrong Answer

Solution code:
n=int(input())
d=[n%4,n%7,n%11,n%15,n%18,n%22,n%26]
p="Yes" if 0 in d else "No"
print(p)

Submission status: Wrong Answer

Solution code:
n=int(input())
d=[n%4,n%7,n%11]
p="Yes" if 0 in d else "No"
print(p)

Submission status: Wrong Answer

Solution code:
n=int(input())
d=[n%4,n%7,n%11]
p="Yes" if d.count(0)>0 else "No"
print(p)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=4
b=7
flag=True
for i in range(a+1):
    for j in range(b+1):
        sum=a*i+b*j
        if sum==n:
            print('Yes')
            flag=False
            break
if flag:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
a=4
b=7
flag=True
for i in range(a+1):
    for j in range(b+1):
        sum=a*i+b*j
        if sum==n:
            print('Yes')
            flag=False
if flag:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
i = -1
while N>0:
    N = N-4
    if N < 0:
        break
    if N % 7 == 0:
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
i = -1
while N>0:
    i += 1
    N = N-4*i
    if N % 7 == 0:
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
i = 0
while N>0:
    N = N-4*i
    if N % 7 == 0:
        print("Yes")
        exit()
    i += 1

print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
if N%4==0 or N%7==0 or N%7==4:
    print('Yes')
else:
    tmp = N
    for i in range(1, N//4):
        tmp-=i*4
        if tmp % 7 == 0:
            print('Yes')
            exit()
    tmp = N
    for i in range(1, N//7):
        tmp-=i*7
        if tmp % 4 == 0:
            print('Yes')
            exit()
    print('No')

Submission status: Wrong Answer

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

for i in range(4,101,4):
    for j in range(7,101,7):
        if i*j > 100: break
        if i*j == n:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

for i in range(4,101,4):
    for j in range(7,101,7):
        if i*j < 100: break
        if i*j == n:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
count = 0
for_flag = True
for i in range(26):
    count = i * 4
    if count > N:
        break
    for j in range(15):
        count += 7
        if count == N:
            flag = True
            for_flag = False
            break
        if count > N:
            break
    if not for_flag:
        break
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
#ABC105B
N = int(input())
OK = False
for i in range(N//4):
    for j in range(N//7):
        if i*4 + j*7 == N:
            OK = True
if OK:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#ABC105B
N = int(input())
flag = False
for i in range(30):
    for j in range(30):
        if i*4 + j*7 == N:
            flag = True
if flag:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
output = 0
for a in range(int(100/4)+1):
  for b in range(int(100/7)+1):
    total = 4*a + 7*b
    if total == N:
      output += 1
print(output)

Submission status: Wrong Answer

Solution code:
N = int(input())
f = False
for i in range(14):
  if (N - 7 * (i + 1)) // 4 >= 0 and (N - 7 * (i + 1)) % 4 == 0:
    f = True
    break
if f:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
f = False
for i in range(14):
  if (N - 7 * (i + 1)) // 4 >= 0 and (N - 7 * (i + 1)) % 4 == 0:
    f = True
    break
if f:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
for i in range(26):
    if i*4>N:
        continue
    if (N-i*4)%7==0:
        print("Yes")
            
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
Y = 'Yes'
N = 'No'
if n >3:
  if n%4 == 0 or n%7 == 0:
    print(Y)
  elif n%4 == 3 or n%7 == 4:
    print(Y)
  elif n%4 == 1 and n%7 == 1:
    print(Y)
  else:
    print(N)
else:
  print(N)

Submission status: Wrong Answer

Solution code:
n = int(input())
Y = 'Yes'
N = 'No'
if n >3:
  if n%4 == 0 or n%7 == 0 or n%4 == 3:
    print(Y)
  else:
    print(N)
else:
  print(N)