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:
import sys

N = int(input())

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
div4 = n % 4
div7 = n % 7
div11 = n % (7 + 4)
list_div = [str(i) for i in range(11, n + 1, 4)]
if div4 == 0 or div7 == 0 or div11 == 0 or str(n) in list_div:
    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 == N:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

Solution code:
n = input()
mlist = [i*4+j*7 for i in range(0,25) for j in range(0,15)]
if n in mlist:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def judge_47(n):
    if n < 4:
        return False
    if 4 < n < 7:
        return False
    if n % 4 == 0 or n % 7 == 0:
        return True
    if n % 4 == 3:
        return (n - ((n // 4) - 1) * 4) % 7 == 0
    if n % 4 < 3:
        return (n - ((n // 4) - 2) * 4) % 7 == 0


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

    if judge_47(n):
        print('Yes')
    else:
        print('No')



if __name__ == '__main__':
    main()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
for i in range(26):
  for h in range(15):
    if i*4+h*7==a:
      print("Yes")

Submission status: Wrong Answer

Solution code:
ans = int(input())
loopFlg = True

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

      
if loopFlg == True:
  print('NO')
else:
  print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

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 or n%22==0:
  print("Yes")
  
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = input()

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

Submission status: Wrong Answer

Solution code:
N=int(input())
b=0
for i in range(1,26):
    for j in range(1,16):
        if 4*i+7*j==N:
            b+=1
if b!=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
b=0
for i in range(1,25):
    for j in range(1,15):
        if 4*i+7*j==N:
            b+=1
if b!=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
answer="No"
for i in range(26):
  for j in range(16):
    total = 4*i + 7*j
    
    if total==N:
      answer="yes"

print(answer)

Submission status: Wrong Answer

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

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())
x=N//4
ans="No"
for i in range(x+1):
    if 4*i+7*(x-i)==N:
        ans="Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':

	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:
#
# abc105 b
#
import unittest
from io import StringIO
import sys


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """11"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """40"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """3"""
        output = """No"""
        self.assertIO(input, output)


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


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())

f = False

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n // 4
b = n // 7
count = 0

for i in range(a + 1):
    n = n - i * 4
    for j in range(b + 1):
        if n % 7 == 0:
            print("Yes")
            count += 1
            break
        else:
            pass

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

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n // 4
b = n // 7
count = 0

for i in range(a):
    n = n - i * 4
    for j in range(b):
        if n % 7 == 0:
            print("Yes")
            count += 1
            break
        else:
            pass

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

Submission status: Wrong Answer

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

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

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

  
if __name__ == "__main__":
  	main()

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:
import sys
n = int(input())

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

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())
a = N//4 + 1
b= N//7+1
f = False
for i in range(1,a+1):
  for j in range(1,b+1):
    if N == 4*i+7*j:
      print('Yes')
      f = True
if not f:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

flg = False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input());print('NYoe s'[n%11==0 or n%4==0 or n%7==0::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=0
i=1
while True:
  if N<4*i:
    break
  if (N-4*i)%7==0 or (N-7*i)%4==0:
    ans+=1
  i+=1
  
if ans==0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=0
i=1
while True:
  if N<7*i:
    break
  if (N-4*i)%7==0:
    ans+=1
  i+=1
if ans==0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=0
i=1
while True:
  if N<4*i:
    break
  if (N-4*i)%7==0:
    ans+=1
  i+=1
if ans==0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
n = int(s)

price = 0
in_four = 0
in_seven = 0
check = False

for i in range(25):
    price = 0
    price += i * 4
    if price == n:
        check = True
        break
    for j in range(14):
        price += j * 7
        if price == n:
            check = True
            break
        if price > n:
            break

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
# 4, 7
f = []
s = []
tmp = 0
ans = 0
a = math.floor(n/4)
b = math.floor(n/7)
cnt = 0
for i in range(a):
  f.append(4)
for i in range(0, len(f)):
  ans = (n-4*i) % 7
  if ans == 0:
    cnt = 1
    break
  ans = 0
if cnt == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
# 4, 7
f = []
s = []
tmp = 0
ans = 0
a = math.floor(n/4)
b = math.floor(n/7)
cnt = 0
for i in range(a):
  f.append(4)
for i in range(0, len(f)):
  ans = math.floor((n-4*i) % 7) 
  if ans == 0:
    cnt = 1
    break
  ans = 0
if cnt == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n = int(input())

a = 0

while(1):
    tmp = n - 7*a
    if tmp % 4 == 0:
        print("Yes")
        exit()
    a += 1
    if a*7 >= n:
        print("No")
        exit()

Submission status: Wrong Answer

Solution code:
N=int(input())
res=False
for i in range(N//7):
    if (N-7*i)%4==0:
        res=True
        break

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

Submission status: Wrong Answer

Solution code:
#-------------
N = int(input())
#-------------

C_list=[]

for i in range(25):
  for j in range(14):
    C_list.append(4*i + 7*j)

cnt = 0
for i in range(len(C_list)):
  if C_list[i] == N:
    cnt += 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
for i in range(101):
  a = (N - i*4) % 7
  if a == 0:
    flag = True
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
from fractions  import gcd
#input=sys.stdin.readline
import bisect
n=int(input())
i=1
while True:
    if i*4>n:
        print("No")
        break
    if (n-i*4)%7==0:
        print("Yes")
        break
    i+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

A = list(range(4, 101, 4))
B = list(range(7, 101, 7))

is_made = False

if N in (A or B):
    is_made = True
else:
    for a in A:
        for b in B:
            if a+b > N:
                break
            elif a+b == N:
                is_made = True
                break

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

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n = int(input())
    num = 4
    while num <= n:
        if (n - num) % 7 == 0:
            print('Yes')
            sys.exit()
        num += 4
    print('No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

lst = []

for i in range(26):
    for j in range(15):
        if i*4+j*7 >= 100:
            break
        else:
            lst.append(i*4+j*7)

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

Submission status: Wrong Answer

Solution code:
N = int(input())

lst = []

for i in range(1,26):
    for j in range(1,15):
        if i*4+j*7 >= 100:
            break
        else:
            lst.append(i*4+j*7)

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

Submission status: Wrong Answer

Solution code:
N = int(input())

lst = []

for i in range(1,26):
    for j in range(1,15):
        if i*4+j*7 >= 100:
            lst.append(i*4+j*7)

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
fo=0
fou=[]
se=0
sev=[]
fl=False
while fo<100:
  fo+=4
  fou.append(fo)
while se<100:
  se+=7
  sev.append(se)
n=int(input())
for i in fou:
  for j in sev:
    if n==i+j:
      fl=True
      print("Yes")
      break
  if fl:
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def main():
    n=int(input())
    for i in range(26):
        if (n - i*4) % 7 == 0:
            print("Yes")
            return
    print("No")
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

flag = False
for ia in range(0, int(x/4)):
    for ib in range(0, int(x/4)):
        if 4 * ia + 7 * ib == x:
            flag = True
            break
    if flag:
        break

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

Submission status: Wrong Answer

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

for i in range(0, 26, 1):
  for j in range(0, 16, 1):
    if i * 4 + j * 7 == N:
      print('Yes')
      k = 1
      break
else:
  if k != 1:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 'No'
X = N % 4
Y = N % 7
if X % 7 == 0 or Y % 4 == 0:
    ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a%7
b = a%4

c = a%4
c = c%7
if b == 0:
  print('Yes')
elif c ==0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a % 28

c = b % 7
d = b % 4
if c % 4 ==0:
  print('Yes')
  exit()
elif d % 7 ==0:
  print('Yes')
  exit()
print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a % 28

c = b % 7
d = c % 4
if c % 4 ==0:
  print('Yes')
  exit()
elif d % 7 ==0:
  print('Yes')
  exit()
print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = 0
while n>0:
    if n % 4 == 0:
        flag = 1
        break
    n -= 7
print('Yes' if flag == 1 else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
for i in range(N):
    if ((i+1)%7)%4==0 and 10<N:print('Yes');exit()
print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
for i in range(N):
    if ((i+1)%7)%4==0 or ((i+1)%4)%7==0:print('Yes');exit()
print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
for i in range(N):
    if (i+1%7)%4==0:print('Yes');exit()
print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

if (n % 7) == 3 or n in (1, 2, 5, 6):
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())


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


if a==0:
    print("N0")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n=int(input())


a=0
for i in range(0,26):
    for j in range(0,20):
        if 4*i+7*j==n:
            a+=1


if a==0:
    print("N0")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
res = "No"
for i in range(26):
    for j in range(n):
        a=j;b=i-j
        if a*4 + b*7 ==n and a+b>0:
            res="Yes"
            break
print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

answer = False
for num_4 in range(n//4+1):
  if (n-num_4*4)%7 == 0:
    answer = True 
    break
  
print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())

#4,7何書いても良い

max_CA = int(N / 4) + int(N % 4) 
max_CB = int(N / 7) + int(N % 7)

print(f'four:{max_CA}')
print(f'seven:{max_CB}')

flag = False
for i in range(max_CA +1):
    for j in range(max_CB+1):
        sum_C = 4 * i + 7 * j
        if N == sum_C:
            flag = True
            
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

#4,7


max_CA = int(N / 4) + int(N % 4) 
max_CB = int(N / 7) + int(N % 7)

flag = False
for i in range(max_CA):
    for j in range(max_CB):
        
        sum_C = 4 * i + 7 * j
        
        if N == sum_C:
            flag = True
            
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
a=[4*x+7*y for x in range(200) for y in range(200)]
ans="Yes" if N in a else "No"
print(ans)
print(type(4*x+7*y for x in range(200) for y in range(200)))

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = sum([i+j==N for i in range(0,N,4) for j in range(0,N,7)])
print("Yes" if flag>0 else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

cake = [i for i in range(4, N+1, 4)]

dons = [i for i in range(7, N +1, 7)]

ans = "No"
for i in range(N//4):
    for j in range(N//7):
        if (cake[i] + dons[j]) == N:
            ans = "Yes"
            break

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

cake = [i for i in range(4, N+1, 4)]

dons = [i for i in range(7, N +1, 7)]

ans = "No"
for i in range(N//4):
    for j in range(N//7):
        if cake[i] + dons[j] == N:
            ans = "Yes"
            break

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

cake = [i for i in range(4, N+1, 4)]

dons = [i for i in range(7, N +1, 7)]

ans = "No"
for i in range(N//4):
    for j in range(N//7):
        if cake[i] + dons[j] == N:
            ans = "Yes"
            break

ans

Submission status: Wrong Answer

Solution code:
n = int(input())

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

elif (n % 7) % 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 % 7) % 4 == 0:
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

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

else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
x = int(N / 7)

for i in range(x):
  one = 7 * (i + 1)
  if (N - one) % 4 == 0:
    print("Yes")
    quit()
print("No")

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

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

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def actual(N):
    if N % 4 == 0 or N % 7 == 0 or N % (4 + 7) == 0:
        return 'Yes'

    return 'No'

N = int(input())
print(actual(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=4
b=7
for i in range(26):
	for j in range(15):
		if a*i+b*j==n:
			print('Yes')
		else:
			print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(16):
  if count:
    break
  if n - i * 7 == 0:
    print('Yes')
    break
  for j in range(26):
    if n - i * 7 - j * 4 == 0:
      print('Yes')
      count = 1
      break
if not(count):
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ns = set()
for i in range(1, 26):
    for j in range(1, 16):
        ns.add(4*i + 7*j)
if n in ns:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = False
for n in range(0,25):
    for i in range(0,15):
        if n * 4 + i*7 ==n and n !=0 or i != 0:
            flag = True
if flag :
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = False
for n in range(1,25):
    for i in range(1,15):
        if n * 4 + i*7 ==n:
            flag = True
if flag :
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
flg = False
i = 0
while 7 * i < N:
    j = 0
    while 7 * i + 4 * j <= N:
        if 7 * i + 4 * j == N:
            flg = True
            break
        j += 1
    if flg:
        break
    i += 1
if flg:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
N  = int(input())

#pattern1 7 div first
p1 = ((N-7*(N//7))%4)

#pattern2 4 div first
p2 = ((N-4*(N//4))%7)

if p1*p2 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
for q in range(0, n, 7):
    if q == 0:
        continue
    if q % 4 == 0:
        print("Yes")
        exit(0)
print("No" if (n % 4 != 0) and (n % 7 != 0) else "Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
for q in range(1, n, 7):
    if q % 4 == 0:
        print("Yes")
        exit(0)
print("No" if (n % 4 != 0) and (n % 7 != 0) else "Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 11 != 0:
    if N % 4 != 0:
        if N % 7 != 0:
            print('No')
            exit()
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
cakeA = round(N / 4)
cakeB = round(N / 7)
Flag = False

for a in range(cakeA):
    for b in range(cakeB):
        if (4 * a)+(7 * b) == N:
            Flag = True
            if Flag == True:
                break

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

Submission status: Wrong Answer

Solution code:
N = int(input())
cakeA = round(N / 4)
cakeB = round(N / 7)
Flag = False

for a in range(cakeA):
    for b in range(cakeB):
        if (4 * a)+(7 * b) == N:
            Flag = True
            if Flag == True:
                break
if Flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
cakeA = round(N / 4)
cakeB = round(N / 7)
count = 0

for a in range(cakeA):
    for b in range(cakeB):
        if (4 * a)+(7 * b) == N:
            count = count + 1
print(count)