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

amount = 0
j      = False

for i in range(1, 101) :
    for j in range(1, 101) :
        amount = 4 * i + 7 * j

        if amount == N:
            j = True
            break


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

Submission status: Wrong Answer

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

for i in range(1, 101) :
    for j in range(1, 101) :
        amount = 4 * i + 7 * j

        if amount == N:
            count +=1


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N =int(input())
s=False
l =[7*i for i in range(4)]
for i in range(25):
    for j in l:
        if j+4*i==N:
            s =True
            break
if s:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N =int(input())
l=[0,1,3,5]
if l[N%4] > N//4:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
"""AtCoder"""

import sys
input = sys.stdin.readline

N = int(input())

l = [4, 7]

for i in range(1, 26):
    for j in range(1, 15):
        l.append(4*i + 7*j)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

counter = 0
for number_cake in range(0,N):
	if((N-number_cake*4) % 7 ==0):
		counter += 1

if(counter > 0):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 'No'
for i in range(n):
    if i % 4 == 0:
        for j in range(n):
            if (n - i) % 7 == 0:
                ans = 'Yes'
                break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
memo ={}
for i in range(1,30):
  for j in range(1,30):
    memo[7*i+4*j]=1

memo[7]=1
memo[4]=1

print("Yes" if n in memo else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[1,2,3,5,6,9,10,13]
print("Yes"if a%28 not in b or a>27else"No")

Submission status: Wrong Answer

Solution code:
N = int(input())
div4 = int(N/4) + 1
div7 = int(N/7) + 1

flg = False
for i in range(div4):
  sum = i * 4
  for t in range(div7):
    sum += t * 7
    if(N == sum):
      flg = True
      
      
if(flg):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
iscake = False
dollar = 4
case = []
isYes = False
for i in range(0, 200):
    case.append(dollar)
    if dollar == N:
        isYes = True
    dollar += 1 if iscake else 3
    iscake = not iscake

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

Submission status: Wrong Answer

Solution code:
N = int(input())
iscake = False
dollar = 4
for i in range(0, 200):
    if dollar == N:
        break
    dollar += 1 if iscake else 3
    iscake = not iscake

print("Yes" if dollar == N else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
iscake = False
dollar = 4
for i in range(0, 200):
    dollar += 1 if iscake else 3
    iscake = not iscake
    if dollar == N:
        break

print("Yes" if dollar == N 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:
def piyo():
    n = int(input())
    if (n-7)%4==0 or (n-14)%4==0 or (n-21)%4==0 or n%4==0:
        print("Yes")
        return
    print("No")
        
if __name__ == '__main__':
    piyo()

Submission status: Wrong Answer

Solution code:
N = int(input())

if N >= 28:
    print("Yes")
else:
    fou = []
    sev = []
    for num in range(4):
        fou.append(7*(num+1))
    for num in range(7):
        sev.append(4*(num+1))
    sum = []
    for i in range(7):
        for j in range(4):
            sum.append(sev[i] + fou[j])
    if N in sum:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
if N >= 28:
    print("Yes")
else:
    subN = N
    for i in range(4):
        subN = subN - 7
        if subN % 4 == 0:
            print("Yes")
            break
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
if N >= 28:
    print("Yes")
else:
    if (N % 7) % 4 == 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline
N = int(input())
print("Yes" if (N % 7) % 4 == 0 or (N % 4) % 7 == 0 else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

target = int(sys.stdin.readlines()[0].strip())

value_cake = 4
value_donut = 7
flag = False

for num_cake in range(target // value_cake):
  for num_donut in range(target // value_donut):
    if (num_cake + 1) * value_cake + (num_donut + 1) * value_donut == target:
      flag = True

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

Submission status: Wrong Answer

Solution code:
N = int(input())
list = []
for j in range(1,26):
    for k in range(1,16):
        total = 4 * j + 7 * k
        list.append(total)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
list = []
for j in range(1,26):
    for k in range(1,16):
        total = 4 * j + 7 * k
        if total > 100:
            break
        list.append(total)
if N in list:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    n = int(input())

    check = set()
    for i in range(26):
        for j in range(15):
            temp = 4 * i + 7 * j
            print(i, j, temp)
            if temp > 100:
                pass
            else:
                check.add(temp)

    check.remove(0)

    if n in check:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    n = int(input())

    check = set()
    for i in range(1, 26):
        for j in range(1, 15):
            temp = 4 * i + 7 * j
            if temp > 100:
                pass
            else:
                check.add(temp)

    if n in check:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    n = int(input())

    check = set()
    for i in range(1, 26):
        for j in range(1, 15):
            check.add(4 * i + 7 * j)

    if n in check:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

import sys
N = int(input())
for i in range(0,N,4):
    for k in range(0,N,7):
        if i + k == N:
            print("Yes")
            sys.exit()
print("No")

Submission status: Wrong Answer

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

if N < 4:
    print("No")

else:
    for i in range(N//4 + 1):
        N = N - 4*i

        if N < 0:
            break

        elif N % 7 == 0:
            print("Yes")
            flag = 1
            break

        else:
            continue 

    if flag == 0:
        print("No")

Submission status: Wrong Answer

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

if N < 4:
    print("No")

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

        else:
            continue 

if flag == 0:
    print("No")

Submission status: Wrong Answer

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

if N < 4:
    print("No")

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

        else:
            continue 

if flag == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
list = []
y = 0
while N - 7*y >0:
    if (N - 7*y)%4 == 0:
        x = (N - 7*y)%4
        list.append(x)
        y +=1
    else:
        y +=1
        continue
        
if list == []:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
i = 1
while N>4:
  N = N - i*7
  if N % 4 == 0:
    print("Yes")
  else:
    i = i+1
    continue
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(range(1,26))
c = 0
for i in L:
    for j in L:
        if 4*i+7*j==N:
            c+=1
if c>0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
for i in range(a//4):
    if i * 4 + ((a//4 - i) * 7) == a:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 4: # 最小以下
  print("No")

if n % 4 == 0 or n % 7 == 0:  # 片方でわる
  print("Yes")
else:
  four_max = n // 4

  m = 1
  ans = False
  while m < four_max + 1:
    if (n - (4*m)) % 7 == 0:
      ans = True
      break
    m = m+1

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 4: # 最小以下
  print("No")

if n % 4 == 0 or n % 7 == 0:  # 片方でわる
  print("Yes")

four_max = n // 4

m = 1
ans = False
while m < four_max + 1:
  if (n - (4*m)) % 7 == 0:
    ans = True
    break
  m = m+1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
A=N%4
B=N%7
C=N%11
if N<4:
	print('No')
elif A==0:
	print('Yes')
elif B==0:
	print('Yes')
elif C==0:
	print('Yes')  
elif A%7==0:
	print('Yes')
elif B%4==0:
	print('Yes')
elif C%4==0:
	print('Yes') 
elif C%7==0:
	print('Yes')  
else:
	print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(26):
    for t in range(16):
        if i*4 + t*7 == N:
            count += 1
            break

print("Yes") if count == 1 else print("No")

Submission status: Wrong Answer

Solution code:
# 値を入力
N = int(input())
res = "yes"
# 計算
if (N % 7) % 4 != 0 and (N % 4) % 7 != 0 and N % (7 + 4) != 0:
    res = "No"
print(res)

Submission status: Wrong Answer

Solution code:
# 値を入力
N = int(input())
res = "yes"
# 計算
if (N % 7) % 4 != 0 and (N % 4) % 7 != 0:
    res = "No"
print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
donuts = 7
sum_item = cake+donuts
if N > 100:
    print('No')
    
if N%cake == 0 or N%donuts == 0 or N%sum_item == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
donuts = 7
sum_item = cake+donuts

if N%cake == 0 or N%donuts == 0 or N%sum_item == 0:
    print('Yes')
else:
    print('No')

'''''
while True:
    while True:
        cake+=1
        sum_money = cake*4 + donuts*7
        print('cake:{},donut:{}'.format(cake, donuts))
        if sum_money == N:
            print('Yes')
            exit()
        elif sum_money > N:
            cake=0
            sum_money=0
            break
    donuts+=1
    if 
'''''

Submission status: Wrong Answer

Solution code:
n = int(input())
coins = [4, 7]
m = len(coins)
dp = [[False for j in range(n + 1)] for i in range(m + 1)]
for i in range(m):
    dp[i][0] = True

for i in range(1, m + 1):
    for j in range(1, n + 1):
        dp[i][j] = (dp[i - 1][j] | dp[i][j - coins[i - 1]]) if j - coins[i - 1] >= 0 else dp[i - 1][j]

print('Yes' if dp[m][n] else 'No')

Submission status: Wrong Answer

Solution code:
n = int(input())
coins = [4, 7]
m = len(coins)
dp = [[False for j in range(n + 1)] for i in range(m + 1)]
for i in range(m):
    dp[i][0] = True

for i in range(1, m + 1):
    for j in range(1, n + 1):
        dp[i][j] = dp[i - 1][j] | dp[i][j - coins[i - 1]
                                        ] if j - coins[i - 1] >= 0 else dp[i - 1][j]

print('Yes' if dp[m][n] else 'No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if (N % 4) % 3 == 0 and not N == 3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
a = int(input())

if a <= 3:
  print("No")
else:
  while a >= 0:
    if a % 4 == 0:
      print("YES")
      break
    else:
      a -= 7
      if a < 0:
        print("No")
        break

Submission status: Wrong Answer

Solution code:
a = int(input())

if a <= 3:
  print("No")
else:
  while a >= 0:
    if a % 4 == 0:
      print("YES")
      break
    else:
      a -= 7
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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:
# coding: utf-8
# Your code here!

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:
# coding: utf-8

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

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:
import sys
n=int(input())
while(1):
    if(n%4==0):
        print("Yes")
        sys.exit(0)
    n-=7
    if(n<=3):
        break
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
l = []

for i in range(int(N/4)):
    for j in range(int(N/7)):
        if i * 4 + j * 7 <= 100:
            l.append(i * 4 + j * 7)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
if N%4==N or N%7==N:
  print('No')
elif N<14 and N%4==2:
  print('No')
elif N%4==0 or N%4==2 or N%4==7 or N%7==0 or N%7==1 or N%7==4:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
res="No"
for i in range (1,n):
    if (n-7*i)%4==0 and n-7*i>=0 and int((n-7*i)/4!=0):
        res="Yes"
        print("dounat:",i)
        print("cake:",(n-7*i)/4)
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0

for i in range(0, 26):
    for j in range(0, 15):
        t = 4*i + 7*j
        if t == n:
            ans += 1
            break

if ans == 1:
    print('Yes')
elif ans == 0:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
xmax = N//4
ymax = N//7
for x in range(1,xmax+1):
    for y in range(1,ymax+1):
        ans = 4*x + 7*y
        if ans > N:
            continue
        if N == ans:
            print("Yes")
            exit()
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
price = [4,7]
if N < price[0]:
    print("No")
    exit()
mod = N%(price[0] + price[1])
for i in price:
    if N%i == 0 or mod%i == 0:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
c = 4
d = 7
a1 = N%c
a2 = N%d
a3 = N%(c+d)
if(a1 == 0 or a2 == 0 or  a3 == 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 i*4 + j*7 == N:
            print('Yes')
            exit()
print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
i=0
while n-7*i>0:
    m=n-7*i
    if m%4==0:
        print('Yes')
        exit()
    else:
        i+=1
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==3 or n%7==4 or n%11==4 or n%11==7:print('Yes')
else:print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n  = int(input())

res='No'
while(n>0):
  if n%4==0:
    res='Yes'
    break
  n=n-7
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
CAKES = 4
DONUTS = 7

flag = 0
if n % CAKES == 0 or n % DONUTS == 0:
    flag = 1
else:
    if n > CAKES or n > DONUTS:
        tmp = n
        while tmp >= 0:
            tmp = tmp - CAKES
            if tmp - DONUTS == 0:
                flag = 1
                break
        tmp = n
        while tmp >= 0:
            tmp -= DONUTS
            if tmp - CAKES == 0:
                flag = 1
                break
    else:
        flag = 0
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
cake_limit = n//4 + 1
dough_limit = n//7 + 1
flag = True
for i in range(cake_limit):
    for ii in range(dough_limit):
        if 4*(i+1) + 7*(ii+1) == n and flag:
            print("Yes")
            flag = False
if flag:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
for i7 in range(20):
    for i4 in range(30):
        if i7 * 7 + i4 * 4 == N:
            frag = True
            print('Yes')
            break
    if flag:
        break

else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
a=[]
b=0
i=0
for i in range(25):
    for j in range(15):
        a.append(4*i+7*j)
i=0     
for i in range(len(a)):
    if N==a[i]:
        print("Yes")
        b=1
        
if b!=1:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
a=[]
b=0
i=0
for i in range(25):
    for j in range(13):
        a.append(4*i+7*j)
i=0     
for i in range(len(a)):
    if N==a[i]:
        print("Yes")
        b=1
        
if b!=1:
    print("No")

Submission status: Wrong Answer

Solution code:
N=input()
a=[]
b=0
for i in range(25):
    for j in range(13):
        a.append(4*i+7*j)
for i in range(len(a)):
    if N==a[i]:
        print("Yes")
        b=1
        
if b!=1:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 4 == 0:
    print("Yes")
elif N > 7 and (N-7) % 4 ==0:
    print("Yes")
elif N > 14 and (N-14) % 4 ==0:
    print("Yes")
elif N > 21 and (N-21) % 4 ==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
result = 0
for cakes in range(0,int(N/4)+1):
    for donuts in range(0,int(N/7)+1):
        price = cakes*4 + donuts*7
        if price == N:
            result += 1
if result:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
            exit()
if ac:
    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())
print("YES" if n>=7*((-n)%4) else "NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
four_w = []
seven_w = []
cross = []

for i in range(1,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in cross:
    print("Yes")
elif n in seven_w:
    print("Yes")
elif n in four_w:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
four_w = []
seven_w = []
cross = []

for i in range(0,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in cross:
    print("Yes")
elif n in seven_w:
    print("Yes")
elif n in four_w:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
four_w = []
seven_w = []
cross = []

for i in range(0,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in cross:
    print("Yes")
elif n in seven_w:
    print("Yes")
elif n in four_w:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
four_w = []
seven_w = []
cross = []

for i in range(0,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in cross:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
four_w = []
seven_w = []
cross = []

for i in range(1,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

n in four_w,seven_w,cross

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
f = False
for i in range(int(n/4)):
    for j in range(int(n/7)):
        if 4*i + 7*j == n:
            f = True
if f and n>3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
f = False
for i in range(int(n/4)):
    for j in range(int(n/7)):
      if 4*i + 7*j == n:
        f = True
if f and n>3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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