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:
def main():
    N = int(input())
    i = 0
    while 4*i <= N:
        j = 0
        while (4*i + 7*j) <=N:
            print(4*i + 7*j)
            if (4*i+7*j == N):
                print('Yes')
                return
            j = j+1
        i = i+1
    print('No')
    return
main()

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())
 
a = n//4
b = n//7
ans =0

if a == 0 or b == 0:
  print('No')
  exit()

for i in range(a+1):
  for j in range(b+1):
    if i*4+j*7 == n:
      ans += 1
      break
if ans == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n//4
b = n//7
ans =0
for i in range(a+1):
  for j in range(b+1):
    if i*4+j*7 == n:
      ans += 1
      break
if ans == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

for _ in range(n//7):
  n -=7
if n == 4:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

for _ in range(n//7):
  n -=7
if n == 4:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

for _ in range(n//7):
  n -=7
if n == 4:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
while True:
  check = False
  if N % 4 == 0:
    N -= 4
    check = True
  elif N % 7 == 0:
    N -= 7
    check = True
  elif N % 11 == 0:
    N -= 11
    check = True
  if N == 0:
    print('Yes')
    break
  if not check:
    print('No')
    break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# check
for seven_n in range(0, 101, 7):
    if (N - seven_n) % 4 == 0 or N - seven_n == 0:
        print("Yes")
        exit(0)
print("No")

Submission status: Wrong Answer

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

for seven_n in range(0, 101, 7):
    if N - seven_n % 4 == 0 or N - seven_n == 0:
        print("Yes")
        exit(0)
print("No")

Submission status: Wrong Answer

Solution code:
# input
N = int(input())
pat = set(
    [
        fn
        for fn in range(4, 100, 4) 
    ] + [
        sn
        for sn in range(7, 100, 7)
    ]
)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
# x, r = divmod(n, 4+7)
x, r = n//(4+7), n%(4+7)
y = x + r//7
# print(n,x,y,r)
# print(n,4*x+7*y)
ans = "No"
if x>0 or y>0:
    if n == 4*x + 7*y: ans = "Yes"
    if n == 4*y + 7*x: ans = "Yes"


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
# x, r = divmod(n, 4+7)
x, r = n//(4+7), n%(4+7)
y = x + r//7
# print(n,x,y,r)
# print(n,4*x+7*y)
ans = "No"
if x>0 or y>0:
    if n == 4*x + 7*y: ans = "Yes"

y = x
x = y + r//4
if x>0 or y>0:
    if n == 4*x + 7*y: ans = "Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
x, r = n//(4+7), n%(4+7)
y = x + r//7
ans = "No"
if x>0 or y>0:
    if n == 4*x + 7*y: ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
# x, r = divmod(n, 4+7)
x, r = n//(4+7), n%(4+7)
y = x + r//7
print(n,x,y,r)
print(n,4*x+7*y)
ans = "No"
if x>0 or y>0:
    if n == 4*x + 7*y: ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
# x, r = divmod(n, 4+7)
x, r = n//(4+7), n%(4+7)
y = x + r//7
# print(n,x,y,r)
ans = "No"
if x>0 or y>0: ans = "Yes"
if n == 4*x + 7*y: ans = "Yes"
y = x
x = y + r//4
if x>0 or y>0: ans = "Yes"
if n == 4*x + 7*y: ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
# x, r = divmod(n, 4+7)
x, r = n//(4+7), n%(4+7)
y = x + r//7
# print(n,x,y,r)
ans = "No"
if x>0 or y>0: ans = "Yes"
if n == 4*x + 7*y: ans = "Yes"
if n == 4*y + 7*x: ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
x, r = divmod(n, 4+7)
y = x + r//7
# print(n,x,y,r)
ans = "No"
if x>0 or y>0: ans = "Yes"
if n == 4*x + 7*y: ans = "Yes"
if n == 4*y + 7*x: ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
x, r = divmod(n, 4+7)
y = x + r//7
# print(n,x,y,r)
ans = "No"
if x!=0 | y!=0: ans = "Yes"
if n == 4*x + 7*y: ans = "Yes"
if n == 4*y + 7*x: ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
x, r = divmod(n, 4+7)
y = x + r//7
# print(n,x,y,r)
ans = "Yes"
if x==0 and y==0: ans = "No"
if n != 4*x + 7*y: ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n//4
b = n//7
ok = False
for x in range(1,a+1):
    for y in range(1,b+1):
        if n == 4*x + 7*y:
            ok = True
            break
    if ok: break

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

Submission status: Wrong Answer

Solution code:
n = int(input())
x,r = divmod(n,11)
d = r//7
y = x + d
# print(n,d,x,y)
if x<=0 and y<=0:
    print('No')
elif x < 0 or y<0:
    print('No')
# elif n != 4*x + 7*y and n != 7*x + 4*y:
elif n != 4*x + 7*y:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
n = int(input())
x,r = divmod(n,11)
d = r//7
y = x + d
# print(n,d,x,y)
if x==0 and y==0:
    print('No')
elif x < 0 or y<0:
    print('No')
elif n != 4*x + 7*y and n != 7*x + 4*y:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
n = int(input())
x,r = divmod(n,11)
d = r//7
y = x + d
# print(n,d,x,y)
if x==0 and y==0:
    print('No')
elif x < 0 or y<0:
    print('No')
elif n != 4*x + 7*y:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
n = int(input())
x,r = divmod(n,11)
d = r//7
y = x + d
# print(n,d,x,y)
if x<=0 and y<=0:
    print('No')
else:
    if x < 0 or y<0:
        print('No')
    else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
n = int(input())
x,r = divmod(n,11)
d = r//7
y = x + d
# print(n,d,x,y)
if x<=0 and y<=0:
    print('No')
else:
    print('Yes')

# q,r = divmod(n,4)
# y = r // 3
# x = q - y
# # print(n,q,r,x,y)
# if x>=0 and y>=0:
#     print('Yes')
# else:
#     print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
q,r = divmod(n,4)
y = r // 3
x = q - y
# print(n,q,r,x,y)
if x>=0 and y>=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

flag = False

for i in range(math.ceil(N/7)):
    for j in range(math.ceil(N/4)):
        if N - i * 7 - j * 4 == 0:
            flag = True

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

Submission status: Wrong Answer

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

flag = False

for i in range(math.ceil(N/7)):
    for j in range(math.ceil(N/4)):
        if flag == True:
            continue
        if N - i * 7 - j * 4 == 0:
            flag = True

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(N//4 + 1):
    for j in range(N//7 + 1):
        if i * 4 + j * 7 == N:
            ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

m = n
if n%4 ==0:
    ans +=1
if n%7 ==0:
    ans +=1
if (n%7)%4 ==0:
    ans +=1


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

Submission status: Wrong Answer

Solution code:
n = int(input())
x = int(n/4)
y = int(n/7)
total = 0
ans = 0

for i in range(1,x+1):
    total = 4*i
    if total == n:
        ans += 1 

    for j in range(1,y+1):
        total += 7*j
        if total == n:
            ans += 1 
if ans:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())
flag = 0
for i in range((x//7)+1):
    x = x - 7
    if x < 0:
        break
    if x%4 == 0:
        flag = 1

if flag == 1:
    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')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
d_ran = -(-N // 7)
c_ran = -(-N // 4)
find = False
for d in range(d_ran):
    for c in range(c_ran):
        if d * 7 + c * 4 == N:
            find = True
            break
    else:
        continue
    break
print('Yes' if find else 'No')

Submission status: Wrong Answer

Solution code:
N = int(input())
d_ran = -(-N // 7)
c_ran = -(-N // 4)
for d in range(d_ran):
    for c in range(c_ran):
        if d * 7 + c * 4 == N:
            print('Yes')
            break
    else:
        continue
    break
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
#絶対値小さくできるか？
#振動しそうなので
from itertools import dropwhile
from collections import deque
n=int(input())
ans=deque([["",n]])
def bfs(d):
    global ans
    l=len(ans)
    for i in range(l):
        x=ans.popleft()
        new1=[x[0]+"0",x[1]]
        if abs(new1[1])<abs((-2)**d):
            ans.append(new1)
        new2=[x[0]+"1",x[1]-(-2)**d]
        if abs(new2[1])<abs((-2)**d):
            ans.append(new2)
    if d!=0:
        bfs(d-1)
bfs(30)
#全探索

for i in ans:
    if i[1]==0:
        ans=list(dropwhile(lambda x:x=="0",i[0]))
        if len(ans)==0:
            print(0)
        else:
            print("".join(ans))
        break

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
a = math.floor(N / 4)
b = math.floor(N / 7)
ans = "No"
for i in range(a):
  for j in range(b):
    if i * 4 + j * 7 == N:
      ans = "Yes"
      break
  else:
    continue
  break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
a = math.ceil(N / 4)
b = math.ceil(N / 7)
ans = "No"
for i in range(a):
  for j in range(b):
    if i * 4 + j * 7 == N:
      ans = "Yes"
      break
  else:
    continue
  break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
a = math.floor(N / 4)
b = math.floor(N / 7)
ans = "No"
for i in range(a):
  for j in range(b):
    if i * 4 + j * 7 == N:
      ans = "Yes"
      break
  else:
    continue
  break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(1, 100 // 4 + 1):
    for j in range(1, (100 - i) // 4 + 1):
        if n == 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:
    print('Yes')
    exit()
if (n % 7) % 4 ==0:
    print('Yes')
    exit()
print('No')

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
str == 'No'
for i in range (math.floor( N/4 )+1):
    for j in range(math.floor(N/7)+1):
        if 4*i + 7*j == N:
            str = 'Yes'
print(str)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 1 or n == 2 or n == 3 or n == 5 or n == 6 or n == 9 or n == 10 or n == 13:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
out = { 8, 12, 14, 16, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100}

print('Yes' if int(input()) in out else 'No')

Submission status: Wrong Answer

Solution code:
out = {8, 11, 12, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100}

print('Yes' if int(input()) in out else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if (N <= 3):
    ans = 'No'
else:
    mod_7 = N % 7
    
    ans = 'No'
    
    for i in range(mod_7 + 1):
        n = N
        n -= 7 * i
        
        if (n % 4 == 0):
            ans = 'Yes'
            break

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

if (N <= 3):
    ans = 'No'
else:
    mod_4 = N % 4
    mod_7 = N % 7
    
    if (mod_4 == 0 or mod_7 == 0 or mod_7 == 4):
        ans = 'Yes'
    else:
        ans = 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
num = int(input())

fs, ss, ans = 0, 0, 0
is_p = False

if num >= 4:
    if num % 4 == 0:
        is_p = True
    elif num % 4 == 3:
        is_p = True
if num >= 7:
    if num % 7 == 0:
        is_p = True
    elif num % 7 == 4:
        is_p = True
if is_p:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

x = 0

for i in range(1, 26):
    for j in range(1, 16):
        if i * 4 + j * 7 == N:
            x += 1

if x == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:

N = int(input())

A = []
for i in range(1,(N//4)+1) :
    for j in range(1,(N//7)+1) :
        if N == 4*i + 7*j :
            A.append("Yes")
        else :
            A.append("No")

if "Yes" in A :
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:

N = int(input())

A = []
for i in range(1,(N//4)+1) :
    for j in range(1,(N//4)+1) :
        if N == 4*i + 7*j :
            A.append("Yes")
        else :
            A.append("No")

if "Yes" in A :
    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 N == 4*i + 7*j :
            print("Yes")
        else :
            print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
max7 = (N + 6) // 7
ans = 0

for x in range(max7):
    if (N - 7 * x) % 4 == 0:
        ans = 1

if ans == 1:
    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(1):
    while N>0:
        i=1
        N=N-11*i
        if(N<0):
            print("No")
            break
        if(N%4)==0 or (N%7)==0:
            print("Yes")
            
        i=i+1

Submission status: Wrong Answer

Solution code:
n = int(input())
while n>0:
    if n%4==0:
        print("Yes")
        break
    elif n%7==0:
        print("Yes")
        break
    elif n%11==0:
        print("Yes")
        break
    elif(1):
        while n>0:
            i=1
            n = n-4*i
            if n%7==0:
                print("Yes")
                break
            if n<=0:
                print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n==0:
    print("No")
else:
    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:
N=int(input())
if (N%4)==0:
    print("Yes")
elif(N%7)==0:
    print("Yes")
elif(N%11)==0:
    print("Yes")
elif((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 and n%7!=0 and n%11!=0) or n==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())
flag = False
n = 7
if N % 4 == 0 or N % 7 == 0 or (N % 7) % 4 == 0 or (N % 4) % 7 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
n = 7

while n < N:
  if (N % n) % 4 == 0 or N % 4 == 0 or N % 7 == 0:
    flag = True
    break
  n += 7

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

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
n = 7

while n < N:
  if (N % n) % 4 == 0 or N % 4 == 0:
    flag = True
    break
  n += 7

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

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
n = 7

while n < N:
  if (N % n) % 4 == 0:
    flag = True
    break
  n += 7

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

Submission status: Wrong Answer

Solution code:
n = int(input())
cmax = 100 // 4
dmax = 100 // 7
for i in range(0, cmax + 1):
    for j in range(1, dmax + 1):
        if i * 4 + j * 7 == n:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
cmax = 100 // 4
dmax = 100 // 7
for i in range(0, cmax + 1):
    for j in range(1, dmax + 1):
        if i + 4 + j * 7 == n:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    # 整数 1 つ
    n = int(input())
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    max7 = n // 7
    max4 = n // 4

    cnt = 0
    for i in range(max7 + 1):
        for j in range(max4 + 1):
            if 7 *i + 4 *j == n:
                cnt += 1

    print(cnt)

resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
count=0
for i in range(0,30):
  for j in range(0,30):
    if i*4+j+7==30:
      print("Yes")
      break
    count+=1
if count==900:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 4
d = 7
s = 0
flag = False
for i in range(1,100):
    for j in range(1,100):
        s = c*i+d*j
        if s == n:
            flag=True
            break
    if flag:
        break

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(30):
  f = 4*i
  for j in range(30):
    s = 7*j
    if f > 0 and n%f == 0:
        print('Yes')
        quit()
    if s > 0 and n%s == 0:
        print('Yes')
        quit()
    if f > 0 or s > 0 and n%(f+s)==0:
        print('Yes')
        quit()
    if n < f+s:
        break
print('No')

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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())%28
flag=0
for a in range(0,32,4):
  for b in range(0,35,7):
    if a+b==n:
      print("Yes")
      flag=1
      break
      if flag==0:
        print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
kouho = []
for i in range(1,26):
  for j in range(1,15):
    kouho.append(i*4+j*7)
if n in kouho:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Wrong Answer

Solution code:
dollar = int(input())

can = False
for cakes in range(int(dollar / 4) + 1):
  for donuts in range(int(dollar /7) + 1):
    price = 4 * cakes + 7 * donuts
    print(cakes, donuts, price, dollar)
    if price == dollar:
      can = True
      break
    elif price > dollar:
      break
  if can == True:
    break
    
print("Yes" if can == True else "No")

Submission status: Wrong Answer

Solution code:
X = int(input())
ans = 0
cake = int(X/4)
donut = int(X/7)

for a in range(cake):
  for b in range(donut):
    total = a*4 + b*7
    if total == X:
      ans += 1
      
if ans >= 1:      
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()