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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n%11==0 or n%11%4==0 or n%11%7==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())

cake = n // 4

for i in range(cake + 1):
  cake_money = i * 4
  donut_money = n - cake_money
  if donut_money <= 0 and donut_money % 7 == 0:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
dounute = 7
if N <= cake or N <= dounute:
    print("No")
    exit() 
for i in range(N):
    for j in range(N):
        if (dounute * i + cake * j) == N:
            print("Yes")
            exit()
        else:
            continue
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
dounute = 7
if N < cake or N < dounute:
    print("No")
    exit() 
for i in range(N):
    for j in range(N):
        if (dounute * i + cake * j) == N:
            print("Yes")
            exit()
        else:
            continue
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
s = (N//4 +1)
for i in range(s):
  for j in range(s):
    if 4*i+7*j == N:
      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 4 * i + 7 * j == N:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
	N = int(input())
	dp = [False]*(101)
	dp[4] = True
	dp[7] = True
	for i in range(4, 101):
		if i + 7 <= 100:
			dp[i+7] = dp[i]
		if i + 4 <= 100:
			dp[i+4] = dp[i]

	if dp[N]:
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
	N = int(input())
	dp = [False]*(101)
	dp[4] = True
	dp[7] = True
	for i in range(4, 101):
		if i + 7 < 100:
			dp[i+7] = dp[i]
		if i + 4 < 100:
			dp[i+4] = dp[i]

	if dp[N]:
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())

ans = "No"

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def dfs(x):
    if x >= 100:
        return 0
    cnt = 1 if x == N else 0
    cnt += dfs(x+4)
    cnt += dfs(x+7)
    return cnt

print('Yes' if dfs(0) >= 1 else 'No')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

x = N % 4 
if x == 4 or x == 7 or x == 11:
    print('Yes')
    quit()
x = N % 7
if x == 4 or x == 7 or x == 11:
    print('Yes')
    quit()
x = N % 11
if x == 4 or x == 7 or x == 11:
    print('Yes')
    quit()
print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 4 != 0 and N % 7 != 0 and N % 11 != 0 and N % 18 !=0 and N % 15 !=0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

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):
    if ((N - (4 * i)) % 7 == 0):
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
for i in range(26):
    if ((N - (4 * i)) % 7 == 0):
        print("Yes")
        exit()
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())
counter=0

for an in range(26):
    for bn in range(15):
        if 4*an+11*bn==N:
                counter+=1

if counter != 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


main()

Submission status: Wrong Answer

Solution code:
N = int(input())
i = 0
while i < N // 4:
    if (N - 4 * i) % 7 == 0:
        print('Yes')
        break
    else:
        i += 1
if i == N // 4:
    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())
ans="No"
if n%7==0 or n%4==0 or (n%4)%7==0 or (n%7)%4==0:
    ans="Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(a):
  for j in range(b):
    if 4*i+7*j == N:
      judge =True
      break
      
    #if 4*i+7*j > N:
    #  break
      
  if judge:
    break
    
if judge:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
a = N//4
b = N//7
 
judge = False
for i in range(a):
  for j in range(b):
    if 4*i+7*j == N:
      judge =True
      break
    if 4*i+7*j > N:
      break
  if judge:
    break
 
if judge:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = False
for i in range(100//7 + 1):
  for j in range(100//4 + 1):
    if i*7 + j+4 == n:
      ans = True
      break

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

Submission status: Wrong Answer

Solution code:
#105
n = int(input())
list = [1,2,3,5,6,9,13,17]
if list.count(n)==1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
a = N // 4
b = N // 7
for j in range(b+1):
    for i in range(a+1):
        if i * 4 + j * 7:
            print("Yes")
            exit()
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:
print('YNeos'[int(input()) in[1,2,3,5,6,9,10,13,17]])

Submission status: Wrong Answer

Solution code:
N=input()
flag=0
for i in range(26):
  for j in range(15):
    if 4*i+7*j==int(N):
     flag=1
    break

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

Submission status: Wrong Answer

Solution code:
N=input()
flag=0
for i in range(25):
  for j in range(14):
    if 4*i+7*j==int(N):
     flag=1
    break

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
rest_ele=n%11
if n%4==0 or n%7==0 or rest_ele==0:
    print('Yes')
elif (rest_ele)%4==0 or (rest_ele)%7==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,int(100/7)+1):
    if 7*i > N:
        break
    for j in range(1, 26):
        if 7*i+4*j > N:
            break
        elif 7*i+4*j == N:
            judge = True
            break
    
if judge:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N not in [1, 2, 43, 5, 6, 9, 10, 13, 17, 20]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC105 B
#
#Nから7を順番に引いていき,4の倍数になったときに4以上になっているかどうかを判定すればよい
N = int(input())
while N%4 != 0:
	N = N - 7
if N >= 4:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False
for ai in range(1,100+1):
	for bi in range(1,100+1):
		if ai*4+bi*7 == n:
			flag = True

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

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False
for ai in range(1,100):
	for bi in range(1,100):
		if ai*4+bi*7 == n:
			flag = True

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N>100 or N<0:
    exit()
N = N%28
bool_n = False
for i in range(5):
    if (N-7*i)%4==0 and  N-7*i>=0:
        print("yes")
        bool_n = True
        break
    
if not bool_n:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
N = N%28
bool_n = False
for i in range(5):
    if (N-7*i)%4==0 and  N-7*i>=0:
        print("yes")
        bool_n = True
        break
        
if not bool_n:
    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 i*4 + j*7 == n:
            print("Yes")
            break
        elif (i == n//4) and (j == n//7):
            print("No")
            break
    else:
        continue
    break

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

Submission status: Wrong Answer

Solution code:
N = int(input())
N = N%28
bool_n = False
for i in range(5):
    if (N-7*i)%4==0 and  N-7*i>=0:
        print("yes")
        bool_n = True
        break
        
if not bool_n:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def cakes_and_donuts(N: int) -> bool:
    while N > 0:
        if N % 4 == 0:
            return True
        N -= 7

    return N == 0  # <=> N % 7 == 0


if __name__ == "__main__":
    N = int(input())
    ans = cakes_and_donuts(N)
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<4:
    print("No")
    while True:
        n-=7
        if n%4==0 or n%7==0:
            print("Yes")
            break
            if n<4:
                print("No")
                break

Submission status: Wrong Answer

Solution code:
n=int(input())
while True:
    n-=7
    if n%4==0 or n%7==0:
        print("Yes")
        break
    if n<4:
        print("No")
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def rec(x):
  if x < 4:
    return False
  if x % 4 == 0 or x % 11 == 0:
    return True
  return rec(x - 4) or rec(x - 11)

if rec(int(input())):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

for i in range(N+1):
    for j in range(N+1):
        if N == 4*i+7*j:
            print ("Yes")
            sys.exit()
    
print("N0")

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while N > 0:
    if N % 4 == 0:
        answer = True
    N -= 7

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def func(n):
    for k in range(N//4):
        for d in range(N//7):
            if 4 * k + 7 * d == N:
                return 'Yes'
    return 'No'

print(func(N))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 27 16:39:16 2019

@author: yuta
"""

def cakedonut(n):
    count = 0
    if n != 0:
        max_count = (int(n/7) + 1) * (int(n/4) + 1)
        for i in range(int(n/7) + 1):
            for j in range(int(n/4) + 1):
                price = 7 * i + 4 * j
                rest = n - price
                if rest == 0:
                    break
                else:
                    count += 1
            break
        if count < max_count:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
        
N = int(input())
cakedonut(N)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 27 16:39:16 2019

@author: yuta
"""

def cakedonut(n):
    count = 0
    max_count = (int(n/7) + 1) * (int(n/4) + 1)
    for i in range(int(n/7) + 1):
        for j in range(int(n/4) + 1):
            price = 7 * i + 4 * j
            rest = n - price
            if rest == 0:
                break
            else:
                count += 1
        break
    if count < max_count:
        print("Yes")
    else:
        print("No")
        
N = int(input())
cakedonut(N)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 27 16:39:16 2019

@author: yuta
"""

def cakedonut(n):
    count = 0
    for i in range(int(n/7) + 1):
        for j in range(int(n/4) + 1):
            price = 7 * i + 4 * j
            rest = n - price
            if rest == 0:
                break
            else:
                count += 1
        break
    print("Yes")
    if count == (int(n/7) + 1) * (int(n/4) + 1):
        print("No")
        
N = int(input())
cakedonut(N)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 27 16:39:16 2019

@author: yuta
"""

def cakedonut(n):
    rest = n - int(n/7) * 7
    rest = rest - int(rest/4) * 4
    if rest == 0:
        print("Yes")
    else:
        print("No")

N = int(input())
cakedonut(N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
answer = "No"
cake = N//4
nut = N//7

for x in range(cake+1):
  for y in range(nut+1):
    if 4*x + 7*y == N:
      answer = "Yes"

Submission status: Wrong Answer

Solution code:
N = int(input())
answer = "No"
cake = N//4 + 1
nut = N//7 + 1

for x in range(cake):
  for y in range(nut):
    if 4*x + 7*y == N:
      answer = "Yes"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())

if N%4==0:
  print('Yes')
elif N%4==1:
  if N>=21:
    print('Yes')
  else:
    print('No')
elif N%4==2:
  print('No')
elif N%4==3:
  if N>=7:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
def main() -> None:
    N = int(input())
    for x in range(0, N, 4):
        for y in range(0, N, 7):
            if x + y == N:
                print("Yes")
                exit()
    print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

torf = False

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

cnt =0

for i in range(26):
    for j in range(15):
        if i * 4 + j * 7 == n:
            cnt +=1
            if cnt >0:
                print('Yes')
                break
            else:
                print('No')

Submission status: Wrong Answer

Solution code:
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  
  ans = 'No'
  if N % 11 == 0:
    ans = 'Yes'
  else:
    for i in range(N//11 + 1):
      m = N - 11 * i
      if m % 4 == 0:
        ans = 'Yes'
        break
  
  print(ans)


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  
  ans = 'No'
  while N > 0:
    if N % 11 == 0:
      ans = 'Yes'
      break
    elif N % 4 == 0:
      ans = 'Yes'
      break
    N -= 4
  
  print(ans)


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  while (N % 11 == 0) and (N > 0):
    N -= 11

  while (N % 4 == 0) and (N > 0):
    N -= 4
  
  if N == 0:
    print('Yes')
  else:
    print('No')


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
max_cake = n//4
max_donut = n//7
ans = "No"
if max_cake != 0 or max_donut != 0:
    for cake in range(1, max_cake+1):
        for donut in range(1, max_donut+1):
            if n % (4*cake + 7*donut) == 0:
               ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
def fits(N):
    answer = 'No'
    for cake in range(0,100,4):
        for donut in range(0,100,7):
            if cake + donut is N:
                answer = 'yYs'
    return answer
if __name__ == '__main__':
    N = int(input())
    print(fits(N))

Submission status: Wrong Answer

Solution code:
def fits(N):
    answer = 'no'
    for cake in range(0,100,4):
        for donut in range(0,100,7):
            if cake + donut is N:
                answer = 'yes'
    return answer
if __name__ == '__main__':
    N = int(input())
    print(fits(N))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
def fits(N):
    if N < 4:
        return 'no'
    else:
        for cake in range(0,100,4):
            for donut in range(0,100,7):
                if cake + donut is N:
                    return 'yes'
if __name__ == '__main__':
    N = int(input())
    print(fits(int(N)))

Submission status: Wrong Answer

Solution code:
class Solver(object):
    def __init__(self):
        self.valids = self._generate_valid_list()
        self.n = int(input())

    def solve(self):
        if self.n in self.valids:
            print("Yes")
        else:
            print("No")

    def _generate_valid_list(self):
        valids = set()
        for cake in range(26): # 0 .. 25
            if cake == 1:
                continue
            for donut in range(16):  # 0 .. 15
                if donut == 1:
                    continue
                valids.add( (donut*7) + (cake*4) )
        return valids
                
                


if __name__ == "__main__":
    s = Solver()
    s.solve()

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())
while True:
  if n%4==0:
    print("YES")
    break
  n-=7
  if n<0:
    print("NO")
    break

Submission status: Wrong Answer

Solution code:
N=int(input())
ans='No'
for n in range(N//4+1):
    if ans=='Yes':
        break
    for m in range(N//7+1):
        if N==7*n+4*m:
            ans='Yes'
            break
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
T = []
if N%7==0 or N%4==0:
    ans='Yes'
    T.append(ans)
else:
    for i in range(25):
        if (N-4*i)%7==0 and (N-4*i)%7>0:
            ans='Yes'
            T.append(ans)
        elif (N-7*i)%4==0 and (N-7*i)%4>0:
            ans='Yes'
            T.append(ans)
        else:
            ans='No'
            T.append(ans)
if 'Yes' in T:
    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())
count=0
for i in range(25):
  for j in range((100-4*i)//7):
    M = N-4*i-7*j
    if(M==0):
      print('Yes')
      count+=1
      break
  if(count==1):
    break
if(count==0):
  print('No')