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())
four = []
seven = []
fs = []

for i in range(n):
    if (i+1)*4 <= n:
        four.append((i+1)*4)

for i in range(n):
    if (i+1)*7 <= n:
        seven.append((i+1)*7)

for i in range(n):
    if (i+1)*(4+7) <= n:
        four.append((i+1)*(4+7))

if n in four:
    print('Yes')
    if n in seven:
        print('Yes')
        if n in fs:
            print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n % 11
b = n % 7
c = n % 4

if n <= 3:
	print('NO')
elif a == 0 or a == 3 or b == 0 or b == 4 or c == 0 or c == 3:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())

if n%4 != 0:
	n = int(n%7)

if n != 0:
	n = int(n%4)

if n == 0:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
def solve():
    n = int(input())
    max_cake = n // 4
    max_donut = n // 7
    for c in range(max_cake + 1):
        for d in range(max_donut + 1):
            if n == 4 * c + 7 * d:
                return "Yes"
    return "No"


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
n = int(input())

for x in range(0,n):
    for y in range(0,n):
        if 4*x + 7*y == n:
            result="Yes"
        else:
            result="No"
            
            
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 4:
    print("No")
else:
    flg = False
    for c in range(N):
        if (N-c*4)%7 == 0:
            flg = True
            break
    print("Yes" if flg else "No")

Submission status: Wrong Answer

Solution code:
import sys
cakes = 4
donuts = 7
amount = int(input())
i = 0

while amount >= i * donuts:
    i += 1
    x = 0

    if amount == i * donuts:
        print('yes')
        sys.exit()

    while amount - ( i * donuts ) >= x * cakes:
        if amount - ( i * donuts ) == x * cakes:
            print('yes')
            sys.exit()

print('No')

Submission status: Wrong Answer

Solution code:
import sys
cakes = 4
donuts = 7
amount = int(input())

if amount < 4 :
    print('No')
    sys.exit()

for i in range( int( amount / 4 ) +1 ):
    if amount == i * cakes:
        print('Yes')

    for x in range( int( amount / 7 ) +1 ):
        if amount - (i * cakes ) == x * donuts:
            print('Yes')
            sys.exit()

print('No')

print('No')

Submission status: Wrong Answer

Solution code:
import sys
cakes = 4
donuts = 7
amount = int(input())

if amount < 7 :
    print('No')
    sys.exit()
    
for i in range( int( amount / 4 ) +1 ):
    if amount == i * cakes:
        print('Yes')

    for x in range( int( amount / 7 ) +1 ):
        if amount - (i * cakes ) == x * donuts:
            print('Yes')
            sys.exit()

print('No')

Submission status: Wrong Answer

Solution code:
import sys
cakes = 4
donuts = 7
amount = int(input())

for i in range(int(amount/4)+1):
    if amount == i * cakes:
        print('Yes')
    for x in range(int(amount/7)+1):
        if amount - (i * cakes ) == x * donuts:
            print('Yes')
            sys.exit()

print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = "No"

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
num = int(n // 7)
count = 0
for i in range(num):
    if (n - (i * 7)) % 4 == 0:
        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')
else:
    if n % 4 == 0:
        print('Yes')
    elif (n % 7) % 4 == 0:
        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:
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())
if N % 4 == 0 or N % 7 == 0:
    print('Yes')
    exit()
if  (N-7)%4 == 0 and N > 7:
    print('Yes')
    exit()
if (N-4)%7 == 0 and N > 4:
    print('Yes')
    exit()
print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False
for i in range(n // 4):
  for j in range(n // 7):
    if i * 4 + j * 7 == n:
      flag = True

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
#! /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
N = int(input())
flag = 0
q4 = N // 4
for i in range(q4):
  if(N - 4 * i) % 7 == 0:
    print('Yes')
    flag = 1
    break
if flag == 0: print('No')

Submission status: Wrong Answer

Solution code:


def main():


    N = int(input())

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


    
if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:


def main():


    N = int(input())

    if N%4==0:
        print("Yes")
        exit()
    elif N%7==0:
        print("Yes")
        exit()
    elif N%11==0:
        print('Yes')
        exit()
    
    print('No')




    
if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

if N ==  1 or 2 or 3 or 5 or 6 or 9 or 10 or 13 or 17:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N ==  1 or 2 or 3 or 5 or 6 or 9 or 10 or 13 or 17:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())

if a == 3 or a == 6 or a == 9:
	print("No")
elif a % 4 == 0 or a % 3 == 0:
	print("Yes")
else:
	a = a - (a // 4) * 4
	if a == 0:
		print("Yes")
	else:
		a = a - (a // 3) * 3
		if a == 0:
			print("Yes")
		else:
			print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N<=3 or N > 100:
    print('No')
elif N % 4 == 0:
    print('Yes')
elif N % 7 == 0:
    print('Yes')
elif (N - 91) % 4 == 0:
    print('Yes')
elif (N - 84) % 4 == 0:
    print('Yes')
elif (N - 77) % 4 == 0:
    print('Yes')
elif (N - 70) % 4 == 0:
    print('Yes')
elif (N - 63) % 4 == 0:
    print('Yes')
elif (N - 56) % 4 == 0:
    print('Yes')
elif (N - 49) % 4 == 0:
    print('Yes')
elif (N - 42) % 4 == 0:
    print('Yes')
elif (N - 35) % 4 == 0:
    print('Yes')
elif (N - 28) % 4 == 0:
    print('Yes')
elif (N - 21) % 4 == 0:
    print('Yes')
elif (N - 14) % 4 == 0:
    print('Yes')
elif (N - 7) % 4 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N==0 or N > 100:
    print('No')
elif N % 4 == 0:
    print('Yes')
elif N % 7 == 0:
    print('Yes')
elif (N - 91) % 4 == 0:
    print('Yes')
elif (N - 84) % 4 == 0:
    print('Yes')
elif (N - 77) % 4 == 0:
    print('Yes')
elif (N - 70) % 4 == 0:
    print('Yes')
elif (N - 63) % 4 == 0:
    print('Yes')
elif (N - 56) % 4 == 0:
    print('Yes')
elif (N - 49) % 4 == 0:
    print('Yes')
elif (N - 42) % 4 == 0:
    print('Yes')
elif (N - 35) % 4 == 0:
    print('Yes')
elif (N - 28) % 4 == 0:
    print('Yes')
elif (N - 21) % 4 == 0:
    print('Yes')
elif (N - 14) % 4 == 0:
    print('Yes')
elif (N - 7) % 4 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N==0 or N > 100:
    print('No')
elif N % 4 == 0:
    print('Yes')
elif N % 7 == 0:
    print('Yes')
elif (N - 98) % 4 == 0:
    print('Yes')
elif (N - 91) % 4 == 0:
    print('Yes')
elif (N - 84) % 4 == 0:
    print('Yes')
elif (N - 77) % 4 == 0:
    print('Yes')
elif (N - 70) % 4 == 0:
    print('Yes')
elif (N - 63) % 4 == 0:
    print('Yes')
elif (N - 56) % 4 == 0:
    print('Yes')
elif (N - 49) % 4 == 0:
    print('Yes')
elif (N - 42) % 4 == 0:
    print('Yes')
elif (N - 35) % 4 == 0:
    print('Yes')
elif (N - 28) % 4 == 0:
    print('Yes')
elif (N - 21) % 4 == 0:
    print('Yes')
elif (N - 14) % 4 == 0:
    print('Yes')
elif (N - 7) % 4 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())
if a == 3 or a == 6 or a == 9:
	print("No")
elif a % 4 == 0 or a % 7 == 0:
	print("Yes")
else:
	a = a - (a // 4) * 4
	if a == 0:
		print("Yes")
	else:
		a = a - (a // 3) * 3
		if a == 0:
			print("Yes")
		else:
			print("No")

Submission status: Wrong Answer

Solution code:
a = int(input())
if a == 3 or a == 6:
	print("No")
elif a % 4 == 0 or a % 7 == 0:
	print("Yes")
else:
	a = a - (a // 4) * 4
	if a == 0:
		print("Yes")
	else:
		a = a - (a // 3) * 3
		if a == 0:
			print("Yes")
		else:
			print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N==0 or N > 100:
    print('No')
elif N % 4 == 0:
    print('Yes')
elif N % 7 == 0:
    print('Yes')
elif N % 11 == 0:
    print('Yes')
elif N % 15 == 0:
    print('Yes')
elif N % 18 == 0:
    print('Yes')
elif (N % 7) % 4 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N==0 or N > 100:
    print('No')
elif N % 4 == 0:
    print('Yes')
elif 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==0 or N > 100:
    print('No')
elif N % 4 == 0:
    print('Yes')
elif N % 7 == 0:
    print('Yes')
elif (N - 7) % 4 == 0:
    print('Yes')
elif (N - 14) % 4 == 0:
    print('Yes')
elif (N - 21) % 4 == 0:
    print('Yes')
elif (N - 28) % 4 == 0:
    print('Yes')
elif (N - 35) % 4 == 0:
    print('Yes')
elif (N - 42) % 4 == 0:
    print('Yes')
elif (N - 49) % 4 == 0:
    print('Yes')
elif (N - 56) % 4 == 0:
    print('Yes')
elif (N - 63) % 4 == 0:
    print('Yes')
elif (N - 70) % 4 == 0:
    print('Yes')
elif (N - 77) % 4 == 0:
    print('Yes')
elif (N - 84) % 4 == 0:
    print('Yes')
elif (N - 91) % 4 == 0:
    print('Yes')
elif (N - 98) % 4 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N==0 or N > 100:
    print('No')
elif N % 4 != 0 and N % 7 != 0 and (N % 7) % 4 != 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N==0 or N > 100:
    print('No')
elif N % 4 != 0 and N % 7 != 0 and (N % 7) % 4 == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

    print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

    print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 'No'

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input());

if N % 4 == 0:
  print('Yes3');
elif N % 7 == 0:
  print('Yes4');
elif N % 11 == 0:
  print('Yes5');
else:
  # 4基準で判定
  flag = False;
  copyN = N;
  while copyN >= 0:
    if copyN % 7 == 0:
      print('Yes1');
      flag = True;
      break;
    else:
      copyN -= 4;
  # 7基準で判定
  copyN = N;
  while copyN >= 0:
    if copyN % 4 == 0:
      print('Yes2');
      flag = True;
      break;
    else:
      copyN -= 7;
  if flag == False:
    print('No');

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC 105, B - cakes and donuts
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

c = 0
anx = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
tf = False
for i in range(1, 26):
    for j in range(1,16):
        if 4 * i + 7*j == n:
            print("Yes")
            tf = True
            break

if not tf:
    print("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:
def candd(n):
  count = 0
  for i in range(25):
    for s in range(15):
      answer = 4*i + s*15
      if answer == n:
        count +=1
  if count >0:
    print('Yes')
  else:
    print('No')

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
tmp = (N // 4)
ans = 'No'
for i in range(1, tmp + 1):
    for j in range(1, tmp + 1):
        total = (4 * i) + (7 * j)
        if total == N:
            ans = 'Yes'
            break
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:
    tmp = N % 11
    if tmp % 4 == 0 or tmp % 7 == 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

Submission status: Wrong Answer

Solution code:
t=int(input())

res='No'

if t>3:
	if t%4==0 or t%7==0 or t%11==0 or t%4==3 or t%7==4 or t%11==1:
		res='Yes'

print(res)

Submission status: Wrong Answer

Solution code:
t=int(input())

res='No'

if t>3:
	if t%4==0 or t%7==0 or t%11==0 or t%4==3 or t%7==4:
		res='Yes'

print(res)

Submission status: Wrong Answer

Solution code:
t=int(input())

res='No'

if t>3:
	if t%4==0 or t%7==0 or t%4==3 or t%7==4:
		res='Yes'

print(res)

Submission status: Wrong Answer

Solution code:
t=int(input())

res='No'

if t%4==0 or t%7==0 or t%4==3 or t%7==4:
	res='Yes'

print(res)

Submission status: Wrong Answer

Solution code:
t=int(input())

res='No'

if t%4==0 or t%7==0 or t%7==4:
	res='Yes'

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
multiple_4 = [x*4 for x in range(101) if x >= 1 and x <= 25]
multiple_7 = [x*7 for x in range(101) if x >= 1 and x <= 14]
multiple_4_7 = [x*4+7 for x in range(101) if x >= 1 and x <= 23]
multiple_7_4 = [x*7+4 for x in range(101) if x >= 1 and x <= 23]
if N in multiple_4 or N in multiple_7 or N in multiple_4_7 or N in multiple_7_4:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
multiple_4 = [x*4 for x in range(101) if x >= 1 and x <= 25]
multiple_7 = [x*7 for x in range(101) if x >= 1 and x <= 14]
multiple_4_7 = [x*4+7 for x in range(101) if x >= 1 and x <= 23]
multiple_7_4 = [x*7+4 for x in range(101) if x >= 1 and x <= 23]
if N in multiple_4 or N in multiple_7 or N in multiple_4_7 or N in multiple_7_4:
  print(N, "Yes")
else:
  print(N, "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
multiple_4 = [x*4 for x in range(100) if x >= 1 and x <= 25]
multiple_7 = [x*7 for x in range(100) if x >= 1 and x <= 14]
multiple_4_7 = [x*4+7 for x in range(100) if x >= 1 and x <= 23]
if N in multiple_4 or N in multiple_7 or N in multiple_4_7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

flag=False

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

flg = 0

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
#h, w = map(int,input().split())
#ls = list(map(int,input().split()))
#ls = [list(map(int,input().split())) for i in range(n)]
#ls = [input() for i in range(h)]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

for i in range(401):
    for j in range(701):
        if i+4+j*7==n:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())

for i in range(400):
    for j in range(700):
        if i+4+j*7==n:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

def cd(n):
    if n < 4:
        return print('No')
    else:
        for i in range(n//4):
            if (n - i * 4) % 7 == 0:
                return print("Yes")

    return print("No")

cd(n)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

    return print("No")

cd(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
import bisect

N = int(input())
root = [4, 7]

if bisect.bisect_right(root, N):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import bisect

N = int(input())
root = [4, 7]


if N % 7 == 0 or N % 4 == 0:
    print("Yes")
else:
    if bisect.bisect_right(root, N):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 7 == 0 or N % 4 == 0 or N % 11 == 0:
    print("Yes")
else:
    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')