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

flag = False

if n%7%4 == 0:
    flag = True

if n%4%7 == 0:
    flag = True
    
if n%4 == 0:
    flag = True

if n%7 == 0:
    flag = True
    
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

A = n%4
B = n%7

if n<4:
    print("No")
else:
    if (A != 0 and A<4) or (B != 0 and B<4):
        print("No")
    elif A%7 == 0 or B%4 ==0 or A == 0 or B == 0:
            print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

A = n%4
B = n%7

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

Submission status: Wrong Answer

Solution code:
n = int(input())

A = n%4
B = n%7

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

Submission status: Wrong Answer

Solution code:
n = int(input())

A = n%4
B = n%7

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

Submission status: Wrong Answer

Solution code:
n = int(input())

A = n%4
B = n%7

if n<4:
    print("No")
elif A%7 != 0 or B%4!=0 or A == 0 or B == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

A = n%4
B = n%7

if  A%7 != 0 or B%4!=0 or A == 0 or B == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
n=int(input())
if n<4:
    print("No")
elif n<7:
    print("No")
elif n%4==0:
    print("Yes")
elif n%7==0:
    print("Yes")
else:
    p=1
    t=True
    while p<26:
        r=n-(4*p)
        if r>=0 and r%7 ==0:
            t=False
            print("Yes")
            break
        p+=1
    if t:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def B():
    n = int(input())
    mul4 = n % 4
    mul8 = n % 8
    mul7 = n % 7
    mul11 = n % 11

    YES='Yes'
    NO='No'

    if mul4==0 or mul7==0 or mul11==0:
        print(YES)
    elif mul7 % 4==0:
        print(YES)
    elif mul8 % 7==0:
        print(YES)
    elif n==30 or n==60 or n==90:
        print(YES)
    else:
        print(NO)
        

if __name__ =='__main__':
    B()

Submission status: Wrong Answer

Solution code:
n = int(input())

cake = 4
dounatsu = 7

c = list()
d = list()

for i in range(1,100):
    if i * cake > 100:
        break
    c.append(i*cake)

for j in range(1,100):
    if j * dounatsu > 100:
        break
    d.append(j*dounatsu)

for i in range(len(c)):
    for j in range(len(d)):
        if c[i] + d [j] == n:
            print("Yes")
            exit()
        else:
            continue
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
donuts = 7
cakes = 4
answer = 0
def calc1():
  for a in range(0,26):
    for b in range(0,26):
      if donuts * a + cakes * b == N:
        return 'Yes'
      elif donuts * a + cakes * b  > N:
        break
  return 'No'

calc1()

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

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

Submission status: Wrong Answer

Solution code:
text=input()
N=text

temp4=[4*i for i in range(25)]
temp7=[7*i for i in range(14)]

temp=list()
flg=False
for i in temp4:
    for j in temp7:
        temp.append(i+j)
        if int(N)==i+j:
            flg=True
            print("Yes")

if flg:
    pass
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def B():
    n = int(input())
    mul4 = n % 4
    mul8 = n % 8
    mul7 = n % 7
    mul11 = n % 11
    YES='Yes'
    NO='No'

    if mul4==0 or mul7==0 or mul11==0:
        print(YES)
    elif mul7 % 4==0:
        print(YES)
    elif mul8 % 7==0:
        print(YES)
    else:
        print(NO)
        

if __name__ =='__main__':
    B()

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a /4
i = 0
if a==0:
  print("No")
elif 0< a < 11:
  if a %4 == 0 or a%7 == 0:
    print("Yes")
  
  else:
    print("No")
else:
  while i <= b:
    c = a - 4 * i
    if c % 7 == 0:
      print("Yes")
      break
    elif c < 7:
      print("No")
      break
    else:
      i += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

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

Submission status: Wrong Answer

Solution code:
#B
N=int(input())
A=[4,8,12,16,20,24,7,14,21,11,19,25]
if N>=28:
    print('Yes')
elif N in A:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
#B
N=int(input())
A=[4,8,12,16,20,24,7,14,21,11,19,25]
if N>=28:
    print('YES')
elif N in A:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a /4
i = 0
if a==0:
  print("No")
elif 0< a < 11:
  if a %4 == 0 or a%7 == 0:
    print("Yes")
  
  else:
    print("No")
else:
  while i <= b:
    c = a - 4 * i
    if c % 7 == 0:
      print("Yes")
      break
    elif i == b:
      print("No")
      break
    else:
      i += 1

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
n=int(input())
if n<4:
    print("No")
elif n<7:
    print("No")
elif n%4==0:
    print("Yes")
elif n%7==0:
    print("Yes")
else:
    p=1
    t=True
    while p<26:
        r=n-(4*p)
        r2=n-(7*p)
        if r>0 and r%7 ==0:
            t=False
            print("Yes")
            break
        elif r2>0 and r2%4==0:
            t=False
            print("Yes")
            break
        p+=1
    if t:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

for i in range(26):
  for j in range(16):
    if N == i * 4 + j * 7:
      print('YES')
      sys.exit()
print('NO')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a /4
i = 0
if a < 11:
  if a %4 == 0 or a%7 == 0:
    print("Yes")
  
  else:
    print("No")
else:
  while i <= b:
    c = a - 4 * i
    if c % 7 == 0:
      print("Yes")
      break
    elif i == b:
      print("No")
      break
    else:
      i += 1

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a /4
i = 0
if a < 11:
  if a %4 == 0 and a%7 == 0:
    print("Yes")
  
  else:
    print("No")
else:
  while i <= b:
    c = a - 4 * i
    if c % 7 == 0:
      print("Yes")
      break
    elif i == b:
      print("No")
      break
    else:
      i += 1

Submission status: Wrong Answer

Solution code:
def B():
    n = int(input())
    mul4 = n % 4
    mul7 = n % 7
    mul11 = n % 11
    YES='Yes'
    NO='No'

    if mul4==0 or mul7==0 or mul11==0:
        print(YES)
    elif mul7 % 4 ==0:
        print(YES)
    else:
        print(NO)

if __name__ =='__main__':
    B()

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

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

Submission status: Wrong Answer

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

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

if not flag:
    print("No")

Submission status: Wrong Answer

Solution code:
# atcoder 105B
import sys

cake = 4
donut = 7

price = int(input())

if price == 0:
    print("No")
    sys.exit()

if price%cake == 0 or price%donut == 0:
    print("Yes")
    sys.exit()

i = 1
j = 1
while (cake*i)+(donut*j)< price:
    while (cake*i)+(donut*j)<price:
        if price%((cake*i)+(donut*j))==0:
            print("Yes")
            sys.exit()
        j += 1
    j = 1
    i += 1
print("No")

Submission status: Wrong Answer

Solution code:
pre = []

for i in range(4, 100, 4):
    for j in range(7, 100, 7):
        pre.append(i + j)

if int(input()) in pre:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
n=int(input())
if n<4:
    print("No")
elif n<7:
    print("No")
elif n%4==0:
    print("Yes")
elif n%7==0:
    print("Yes")
else:
    p=1
    t=True
    while p<100:
        r=n-(4*p)
        if r>0 and r%7 ==0:
            t=False
            print("Yes")
            break
        p+=1
    if t:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# atcoder 105B
import sys

cake = 4
donut = 7

price = int(input())

if price == 0:
    print("No")
    sys.exit()

if price%cake == 0 or price%donut == 0:
    print("Yes")
    sys.exit()

i = 1
j = 1
while (cake*i)+(donut*j)< price:
    while (cake*i)+(donut*j)<price:
        if price%((cake*i)+(donut*j)):
            print("Yes")
            sys.exit()
        j += 1
    j = 1
    i += 1
print("No")

Submission status: Wrong Answer

Solution code:

def B():
    n = int(input())
    mul4 = n % 4
    mul7 = n % 7
    YES='Yes'
    NO='No'

    if mul4==0 or mul7==0:
        print(YES)
    elif mul7 % 4 ==0:
        print(YES)
    else:
        print(NO)

if __name__ =='__main__':
    B()

Submission status: Wrong Answer

Solution code:
N = int(input())
result = "No"
for i in range(11):
  for j in range(11):
    total = 4 * i + 7 * j 
    if N == total :
      result = "Yes"
      break
print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

n=N%7
while(n<N):
    if(n%4==0):
        print('YES')
        exit(0)
    else:
        n+=7

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()


if (int(n) % 4 == 0) or (int(n) % 7 == 0) or (int(n) % 11 == 7) or (int(n) % 11 == 4) or int(n) >= 18:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = a /4
i = 0
if a < 4:
  print("No")
else:
  while i <= b:
    c = a - 4 * i
    if c % 7 == 0:
      print("Yes")
      break
    elif i == b:
      print("No")
      break
    else:
      i += 1

Submission status: Wrong Answer

Solution code:
N = int(input())
result = "No"
for i in range(1, 10):
  for j in range(1, 10):
    total = 4 * i + 7 * j 
    if N == total :
      result = "Yes"
      break
print(result)

Submission status: Wrong Answer

Solution code:
# atcoder 105B
import fractions
import sys

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

cake = 4
donut = 7

price = int(input())

if price == 0:
    print("No")
    sys.exit()

if price%cake == 0 or price%donut == 0:
    print("Yes")
    sys.exit()

i = 1
j = 1
while (cake*i)+(donut*j)< price:
    while (cake*i)+(donut*j)<price:
        if (cake*i)+(donut*j) == price:
            print("Yes")
            sys.exit()
        j += 1
    j = 1
    i += 1
print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n // 4
res = 0
for i in range(a+1):
  N = 4*i
  if N % 7 == 0:
    res += 1

b = n//7    
for i in range(b+1):
  M = 7*i
  if M % 4 == 0:
    res += 1  
    
if res == 0 or n == 0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
result = "No"
for i in range(4 + 1):
  for j in range(7 + 1):
    for k in range(11 + 1):
      total = 4 * i + 7 * j + 11 * k
      if N == total :
        result = "Yes"
        break
print(result)

Submission status: Wrong Answer

Solution code:
# atcoder 105B
import fractions
import sys

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

cake = 4
donut = 7

price = int(input())

if price%cake == 0 or price%donut == 0:
    print("Yes")
    sys.exit()

i = 1
j = 1
while (cake*i)+(donut*j)< price:
    while (cake*i)+(donut*j)<price:
        if (cake*i)+(donut*j) == price:
            print("Yes")
            sys.exit()
        j += 1
    j = 1
    i += 1
print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
f = 4
s = 7
ans = 0
if n <= 3:
    pass
elif n == f:
    ans += 1
elif n == s:
    ans += 1
elif n == 8:
    ans += 1
elif n == 11:
    ans += 1
else:
    for i in range(1, n):
        for n in range(1, n):
            if s + f == n:
                ans = 1
                break

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n // 4
res = 0
for i in range(a+1):
  N = 4*i
  if N % 7 == 0:
    res += 1

b = n//7    
for i in range(b+1):
  M = 7*i
  if M % 7 == 0:
    res += 1  
    
if res == 0 or n == 0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
def B():
    n = int(input())
    mul4 = n % 4
    mul7 = n % 7
    YES='Yes'
    NO='No'

    if mul4==0 or mul7==0:
        print(YES)
    else:
        print(NO)

if __name__ =='__main__':
    B()

Submission status: Wrong Answer

Solution code:
N = int(input())
result = "No"
for i in range(4 + 1):
  for j in range(7 + 1):
    for k in range(7 + 11):
      total = 4 * i + 7 * j + 11 * k
      if N == total :
        result = "Yes"
        break
print(result)

Submission status: Wrong Answer

Solution code:
from itertools import product
print("Yes" if int(input()) in [4*a + 7*b for a, b in product(*[range(1, 101), range(1, 101)])] else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
result = "No"
for i in range(4 + 1):
  for j in range(7 + 1):
    total = 4 * i + 7 * j
    if N == total :
      result = "Yes"
      break
print(result)

Submission status: Wrong Answer

Solution code:
# atcoder 105B
import fractions
import sys

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

cake = 4
donut = 7

price = int(input())

if price%cake == 0 or price%donut == 0:
    print("Yes")
    sys.exit()

i = 1
j = 1
while cake*i+donut*j< price:
    while cake*i+donut*j<price:
        if cake*i+donut*j == price:
            print("Yes")
            sys.exit()
        j += 1
    j = 1
    i += 1
print("No")

Submission status: Wrong Answer

Solution code:
from itertools import product
print("YES" if int(input()) in [4*a + 7*b for a, b in product(*[range(1, 101), range(1, 101)])] else "NO")

Submission status: Wrong Answer

Solution code:
n = int(input())

i = 0
while(i <= n):
    i += 4
    if((n-i)%7 == 0):
        print("Yes")
        exit(0)
print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

i = 0
while(i < n):
    i += 4
    if((n-i)%7 == 0):
        print("Yes")
        exit(0)
print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n // 4
res = 0
for i in range(a+1):
  N = 4*i + 7*(a-i)
  if N == n:
    res += 1
    
if res == 0 or n == 0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

q = N // 7
flag = False
for i in range(q):
    if N % 4 == 0:
        print("Yes")
        flag = True
        break
    elif (N % (7 * (i + 1))) % 4 == 0:
        print("Yes")
        flag = True
        break

if not flag:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if N%7 == 0:
    print("Yes")

if N%4 == 1:
    if N < 29:
        print("No")
    else:
        print("Yes")

if N%4 == 2:
    if N < 11:
        print("No")
    elif N < 15:
        print("No")
    else:
        print("Yes")

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

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
n=int(input())
if n<4:
    print("No")
elif n<7:
    print("No")
elif n%4==0:
    print("Yes")
elif n%7==0:
    print("Yes")
else:
    p=1
    t=True
    while p<100:
        if (n-(4*p))%7 ==0:
            t=False
            print("Yes")
            break
        p+=1
    if t:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n= input().strip()
n = int(n)
if n < 4 or n == 98:
    print("No")
    exit(0)
if n % 4 == 0 or n % 7 == 0 or (n - 4) % 7 == 0 or (n - 7) % 4 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
if (N%4==0)or(N%7==0)or( (N%4==3)and(N!=3) )or( (N%7)==4 )or(N==66):
    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 True:
    M = N%11
    if M%4 == 0 or M%7 == 0:
        print("Yes")
    elif True:
        for i in range(N-M):
            M = M+11
            if M%4 == 0 or M%7 == 0:
                print("Yes")
                break
    elif N == M:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
n=int(input())
if n%4==0:
    print("Yes")
elif n%7==0:
    print("Yes")
else:
    p=1
    t=True
    while p<100:
        if (n-(4*p))%7 ==0:
            t=False
            print("Yes")
            break
        p+=1
    if t:
        print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

a = [False]*107

a[4-1] = True
a[7-1] = True

for i in range (100) :

   if i == n :
      if a[i] == True :
         print('Yes')
      else :
         print('No')
      break

   if a[i] == True :
      a[i+4] = True
      a[i+7] = True

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 4:
    print('No')
    exit()
elif n % 7 == 0 or n % 4 == 0:
    print('Yes')
    exit()
elif n % 7 % 4 == 0 or n % 4 % 7 == 0:
    print('Yes')
    exit()
else:
    for i in range(1, n % 7):
        tmp = n - 7 * i
        if tmp % 4 == 0:
            print('Yes')
            exit()
    for i in range(1, n & 4):
        tmp = n - 4 * i
        if tmp % 7 == 0:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = int(input())

cakes = 4
donuts = 7


if N % cakes == 0 or N % donuts == 0:
    print('Yes')

elif N > donuts:
    while N > donuts:
        N = N - donuts

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

else:
    while N > cakes:
        N = N - cakes

    if N == 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

ans = "No"

x = 0
y = 0

while N > 4 * x:
    y= 0
    while N > 7 * y:
        if N == (4 * x) + (7 * y):
            ans = "Yes"
            break

        y += 1

    if ans == "Yes":
        break
    
    x += 1



print(ans)

Submission status: Wrong Answer

Solution code:
def calc(n):
    ok_list = []
    wi = 0
    w = 0
    while w <= 100:
        wi += 1
        w = 7 + 4 * wi
        ok_list.append(w)

    if n % 11 == 0 or n % 4 == 0 or n % 7 == 0 or n in ok_list:
        ans = 'Yes'
    elif n < 4:
        ans = 'No'
    else:
        num7 = int(n / 7)
        num4 = int(n / 4)
        n_7 = n - num7 * 7
        n_4 = n - num4 * 4
        if n_7 % 4 == 0 or n_4 % 7 == 0:
            ans = 'Yes'
        else:
            ans = 'No'
    return ans


if __name__ == '__main__':
    n = int(input())
    print(calc(n))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 4 == 0: #can buy with cakes raw
  print("Yes")
elif n % 7 == 0: #can buy with donuts raw
  print("Yes")
elif n % 11 == 0: #can buy both evenly
  print("Yes")
else:
  #just do the brute force approach lol
  n %= 7
  n %= 4
  if n > 0:
    print("No")
  else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if N%7 == 0:
    print("Yes")

if N%4 == 1:
    if N < 29:
        print("No")
    else:
        print("Yes")

if N%4 == 2:
    if N < 11:
        print("No")
    elif N < 15:
        print("No")
    else:
        print("Yes")

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if N%7 == 0:
    print("Yes")

if N%4 == 1:
    print("No")

if N%4 == 2:
    if N < 11:
        print("No")
    elif N < 15:
        print("No")
    else:
        print("Yes")

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

Submission status: Wrong Answer

Solution code:
a = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(raw_input())
while True:
    if N == 4:
        print "Yes"
        break
    if N == 7:
        print "Yes"
        break
    if N < 0:
        print "No"
        break
    N = N - 4

Submission status: Wrong Answer

Solution code:
def calc(n):
    ok_list = []
    wi = 0
    w = 0
    while w <= 100:
        wi += 1
        w = 7 + 4 * wi
        ok_list.append(w)

    if n % 4 == 0 or n % 7 == 0 or n in ok_list:
        ans = 'Yes'
    elif n < 4:
        ans = 'No'
    else:
        num7 = int(n / 7)
        num4 = int(n / 4)
        n_7 = n - num7 * 7
        n_4 = n - num4 * 4
        if n_7 % 4 == 0 or n_4 % 7 == 0:
            ans = 'Yes'
        else:
            ans = 'No'
    return ans


if __name__ == '__main__':
    n = int(input())
    print(calc(n))

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())
n_=n%11
if (n_==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 >=28:
  print('Yes')
elif N % 4 == 0:
  print('Yes')
elif N % 7 == 0:
  print('Yes')
elif (N-7) % 4 == 0 and N >= 4:
  print('Yes')
elif (N-14) % 4 == 0 and N >= 4:
  print('Yes')
elif (N-21) % 4 == 0 and N >= 4:
  print('Yes')
elif (N-4) % 7 == 0 and N>=7:
  print('Yes')
elif (N-8) % 7 == 0 and N >= 7:
  print('Yes')
elif (N-12) % 7 == 0 and N >= 7:
  print('Yes')
elif (N-16) % 7 == 0 and N>= 7:
  PRINT('Yes')
elif (N-20) % 7 == 0 and N >= 7:
  print('Yes')
elif (N-24) % 7 == 0 and N >= 7:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(raw_input())
while True:
    N = N - 4
    if N == 0:
        print "Yes"
        break
    if N == 7:
        print "Yes"
        break
    if N < 0:
        print "No"
        break

Submission status: Wrong Answer

Solution code:
# atcoder 105B
import fractions
import sys

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

cake = 4
donut = 7

price = int(input())

if price%cake == 0 or price%donut == 0:
    print("Yes")
    sys.exit()

cake_donut_lcm = lcm(cake, donut)
answer_price = lcm(price, cake_donut_lcm)

if answer_price == price:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if N%7 == 0:
    print("Yes")

if N%4 == 1:
    print("No")

if N%4 == 2:
    if N < 7:
        print("No")
    elif N < 15:
        print("No")
    else:
        print("Yes")

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

ans = "No"


if N % 4 == 0 or N % 4 == 7 or N % 4 == 11:
    ans = "Yes"
elif N % 7 == 0 or N % 7 == 4 or N % 7 == 11:
    ans = "Yes"
elif N % 11 == 0 or N % 11 == 4 or N % 11 == 7:
    ans = "Yes"


print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
lis = []
for i in range(26):
    for m in range(15):
        lis.append(i*m)
print("Yes" if num in lis else "No")

Submission status: Wrong Answer

Solution code:
n=int(input())
d=n//4
e=n//7
flag=0
i=0
while i<=d:
    b=(-4*i)/7+11/7
    if b in range(e+1):
        print("Yes")
        flag=1
    i+=1
    
if flag==0:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
if n%11==0 or n%7==0 or n%4==0:
    print("Yes")
elif n==7 or n==4:
    print("No")
else:
    i=1
    flag=0
    m=1
    while n>0 and m>0:
        m=n-(7*i)
        n=n-m
        if m>0 and n>0 and (n%7==0 or n%4==0 or n%11==0) and (m%4==0 or m%7==0 or m%11==0):
            #print(n,m)
            flag=1
            break
        i+=1
    if flag==1:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

def validate(N):
    if N % 4 == 0:
        return "Yes"
    if N % 7 == 0:
        return "Yes"
    if N % 11 == 0:
        return "Yes"
    
    
    if (N % 4) % 7  == 0:
        return "Yes"
    if (N % 7) % 4 == 0:
        return "Yes"

    
    return "No"


print(validate(N))

Submission status: Wrong Answer

Solution code:
a=int(input())
i=1
b=a
x=a%4
while(a>i*7 and x!=0):
  b=a-(7*i)
  b=b%4
  if(b==0):
    x=0
  i+=1

while(a>i*4 and x!=0):
  b=a-(4*i)
  b=b%7
  if(b==0):
    x=0
  i+=1
  
if(x==0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

ans = "No"


if N % 4 == 0 or N % 4 == 7:
    ans = "Yes"
elif N % 7 == 0 or N % 7 == 4:
    ans = "Yes"
elif N % 11 == 0 or N % 11 == 4 or N % 11 == 7:
    ans = "Yes"


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 7 == 0 or n % 4 == 0:
    print('Yes')
elif n % 7 % 4 == 0 or n % 4 % 7 == 0:
    print('Yes')
elif n % 15 == 0:                                                                                               
    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:
    print("Yes")
else:
    i=1
    flag=0
    m=1
    while n>0 and m>0:
        m=n-(7*i)
        n=n-m
        if m>0 and n>0 and (n%7==0 or n%4==0 or n%11==0) and (m%4==0 or m%7==0 or m%11==0):
            #print(n,m)
            flag=1
            break
        i+=1
    if flag==1:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
for i4 in range(26):
    for i7 in range(15):
        if (i4*4)+(i7*7)==N:
            flag = True
            break
print("yes" if flag else "No")

Submission status: Wrong Answer

Solution code:
a=int(input())
i=1
b=a
x=a%4
while(a>i*7 and x!=0):
  b=a%(7*i)
  b=b%4
  if(b==0):
    x=0
  i+=1

while(a>i*4 and x!=0):
  b=a%(4*i)
  b=b%7
  if(b==0):
    x=0
  i+=1
  
if(x==0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
n= input().strip()
n = int(n)

if n >= 4:
    print("Yes")
else:
    print("No")