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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
donut = 7
c_d = cake + donut

if not N % cake or not N % donut:
  print('Yes')
  exit()

sub = N % c_d

if not sub or not sub % cake or not sub % donut:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
donut = 7
c_d = cake + donut

if not N % cake or not N % donut:
  print('Yes')
  exit()

sub = N % c_d

if not sub % cake or not sub % donut:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())

for i in range(1,26):
    for j in range(1,16):
        if i*4 + j*7 == n:
            print("Yes")
            sys.exit()

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())

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

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = False
for i in range(1,26):
    for j in range(1,15):
        total = 4 * i + 7 * j
        if(total == N):
            ans = True
            break
if(ans):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

C = N//4
D = N//7
count = 0
for c in range(1,C):
    for d in range(1,D):
        if (4*c) + (7*d) == N:
            count += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = "Yes"
if N%4 == 0:
    print(ans)
elif N%7 == 0:
    print(ans)
elif N%11 == 0:
    print(ans)
elif N%15 == 0:
    print(ans)
elif N%19 == 0:
    print(ans)
elif N%23 == 0:
    print(ans)
elif N%26 == 0:
    print(ans)
elif N%37 == 0:
    print(ans)
elif N%41 == 0:
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 4
d = 7
for i in range(26):
    for j in range(16):
        if c*i + d*j == n:
            print(i,j)
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

M = N % 7
L = N % 4

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

Submission status: Wrong Answer

Solution code:
N = int(input())

M = N % 7

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

Submission status: Wrong Answer

Solution code:
#2019/10/25
N = int(open(0).read())
maxCake = N//4+1
maxDon = N//7+1
flg =False
for i in range(maxCake):
    for j in range(maxDon):
        if i*4+j*7==N:
            print('Yes')
            flg = True
            break;
    if flg == True:
        break
if flg == False:
    print('NO')

Submission status: Wrong Answer

Solution code:
# ABC105B - Cakes and Donuts
def main():
    N = int(input())
    flg = N % 4 == 0 or N % 7 == 0
    if flg:
        print("Yes")
    elif N < 4:
        print("No")
    else:
        while N > 7:
            N -= 4
            if flg:
                print("Yes")
                return
        print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())


for i in range(1,N // 4 + 1): # 4で除した値まで回す
    for j in range(1,N // 7 + 1):# 7で除した値まで回す
        if (4* i + 7 * j) == N:
            print("Yes")
            #print("i is", i)
            #print("j is", j)
            exit()

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n==0:
    print(0)
    exit()
x = n
ans = []
while x!=1:
    if x%2==0:
        ans.append("0")
    else:
        ans.append("1")
        x -= 1
    x = x//(-2)
ans.append("1")
print("".join(ans[::-1]))

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = 0
for i in range(n):
  for j in range(n):
    if i+j==11:
      flag = 1
if flag==1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = n%4

if n%4 == 0:
    print('Yes')
elif n%7==0:
    print('Yes')
elif n%11==0:
    print('Yes')
elif ans == 3 and n>3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = n%4

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

Submission status: Wrong Answer

Solution code:
N=int(input())
n=[]
for i in range(1,26):
  for j in range(1,16):
    n.append(4*i+7*j)
if any(N==M for M in n):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[0,7,14,21]
count=0
for i in l:
    if (n-i)>0 and (n-i)%4==0:
        count=0
        break
    else:
        count+=1
print('No' if count>0 else 'Yes')

Submission status: Wrong Answer

Solution code:
flag = False
n=int(input())
for i in range(n):
    for l in range(n):
        if n==(i+1*4+l+1*7):
            flag=True
if flag==False:
    print("No")           
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
flag = False
n=int(input())
for i in range(n):
    for l in range(n):
        if n==(i*4+l*7):
            flag=True
            print("Yes")
if flag==False:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(n):
    for l in range(n):
        if n==(i*4+l*7):
            print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(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())
if n % 4 != 0 and n % 7 != 0 and n % 11 != 0 and n %18 != 0 and n % 15 != 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
N = int(input())

max_4 = int(N / 4)
max_7 = int(N / 7)

cost_list = []
for i in range(max_7 + 1):
    cost = 7 * i
    for j in range(max_4 + 1):
        cost += 4 * j
        cost_list.append(cost)

if N in cost_list:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()

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

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
price = int(input())
cnt = 0

for i in range(26):
    for j in range(17):
        z = price - (4*i + 7*j)
        if z == 0:
            cnt += 1
            break
        else:
            continue

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

Submission status: Wrong Answer

Solution code:
price = int(input())
cnt = 0

for i in range(26):
    for j in range(17):
        z = price - (4*i + 7*j)
        if z == 0:
            cnt += 1
            break

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
for i in range(0,26):
  for j in range(0,15):
    if a==(i*4+j*7):
      print("Yes")
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# ABC105b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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())
if  (N%7)%4 == 0 or (N%4)%7 == 0 or N%11 == 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())
ans =0
for i in range(25):
    for j in range(int(100/7)):
        if(i*4+j*7 ==N):
            ans +=1
print(ans)

Submission status: Wrong Answer

Solution code:
#Cakes and Donuts
N = int(input())
c = 0
for i in range(N+1):
    M = N - 7*i
    for j in range (N - M + 1):
        L = M - 4*j
        if L == 0:
            c += 1
if c == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = 0
for i in range(15):
  for j in range(26):
    if 7*i - 4*j == n:
      flag = 1
      exit

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

Submission status: Wrong Answer

Solution code:
n = int(input())
flag = "No"
for i in range(15):
  for j in range(26):
    if 7*i - 4*j == n:
      flag = "Yes"
      break
      
print(flag)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = 4
b = 7
count = 0
for i in range(0, (N // a) + 1):
    for j in range(0, (N // b) + 1):
        if a * i + b * j == N:
            count += 1
        else:
            pass
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
cnt=0
for i in range(int(n/4)+1):
  for j in range(int(n/7)+1):
    if 4*1+7*j==n:
      cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
cnt=0
for i in range(int(n/4)):
  for j in range(int(n/7)):
    if 4*1+7*j==n:
      cnt+=1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
for x in range(N):
  for y in range(N):
    if 4*x+7*y == N:
      print('Yes')
    else:
      print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
Ans = 0
for x in range(N):
  for y in range(N):
    if 4*x+7*y == N:
      Ans += 1
print(Ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

#4*a + 7*b == N ???

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

Submission status: Wrong Answer

Solution code:
N = int(input())

#4*a + 7*b == N ???

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

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())
m=n//4+1
ans=False
if m%7==0:
  ans=True
else:
  for i in range(1,m):
    if (i*4)%7==0:
      ans=True
      break
print(("No","Yes")[ans])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        N = int(input())
        for d in range(N//7):
            for c in range(N//4):
                if d*7 + c *4 == N:
                    print('Yes')
                    exit()
        print('No')


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        N = int(input())
        while N % 4 == 0:
            N //= 4
        while N % 7 == 0:
            N //= 7
        if N == 1:
            print('Yes')
        else:
            print('No')


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        N = int(input())
        while N % 4 != 0:
            N //= 4
        while N % 7 != 0:
            N //= 7
        if N == 1:
            print('Yes')
        else:
            print('No')


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, = map(int, input().split())

for i in range(100):
    for j in range(100):
        if i == 0 and j == 0:
            continue
        if N == i * 4 + j * 7:
            print("YES")
            exit()

print("NO")

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, = map(int, input().split())

for i in range(100):
    for j in range(100):
        if N == i * 4 + j * 7:
            print("YES")
            exit()

print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())

flg=0
for i in range(0,n//4+1):
  for j in range(0,n//7+1):
    if(i*4+j*7==n):
      flg=1
      break
  else:
    continue
  break
  
if(flg==1):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    tmp = N%11
    if tmp in [0, 4, 7, 8]:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = int(input())
flag = True
while a > 7 and flag:
    if a % 4 == 0:
        print('YES')
        flag = False
    a -= 7
if flag:
    print('YES' if a == 4 or a == 7 else 'NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
#number of cakes
if all( (N - 4*i) % 7 != 0 for i in range(N//4)):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N=int(input())
#number of cakes
if all( (N - 4*i) % 7 != 0 for i in range(N)):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if flag == True:
    print("Yes")
elif flag == False:
    print("No")

Submission status: Wrong Answer

Solution code:
# ABC105 B - Cakes and Donuts
n = int(input())
 
count = 0
 
for x in range(0,n):
    for y in range(0,n):
        if x*4 + y*7 == n:
            count += 1

print("no") if count == 0 else print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

for x in range(N):
    for y in range(N):
        if x*4 + y*7 == N:
            flag = True
        else:
            flag = False
            

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

Submission status: Wrong Answer

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

for i in range(26):
  for j in range(26):
    if (4*i+7*j)==n:
      count += 1
      
print(count)

Submission status: Wrong Answer

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

for i in range(n+1):
  for j in range(n+1):
    if (4*i+7*j)==n:
      count += 1
      
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def check(dollars):
    for cakes in range(0, int(dollars / 4) + 1):
        for doughnuts in range(0, int(dollars / 7) + 1):
            sum = 4 * cakes + 11 * doughnuts
            # print("{}, {}, {}, {}".format(cakes, doughnuts, sum, sum == dollars))
            if sum == dollars:
                return "Yes"
    return "No"

dollars = int(input())
print(check(dollars))

Submission status: Wrong Answer

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

def check(dollars):
    for cakes in range(0, int(100 / 4) + 1):
        for doughnuts in range(0, int(100 / 7) + 1):
            sum = 4 * cakes + 11 * doughnuts
            # print("{}, {}, {}, {}".format(cakes, doughnuts, sum, sum == dollars))
            if sum == dollars:
                return "Yes"
    return "No"

dollars = int(input())
print(check(dollars))

Submission status: Wrong Answer

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

def check(dollars):
    for cakes in range(0, 101):
        for doughnuts in range(0, 101):
            sum = 4 * cakes + 11 * doughnuts
            if not (1 <= sum and sum <= 100):
                continue
            if sum == dollars:
                return "Yes"
    return "No"

dollars = int(input())
print(check(dollars))

Submission status: Wrong Answer

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

def check(dollars):
    for cakes in range(0, 101):
        for doughnuts in range(0, 101):
            sum = 4 * cakes + 11 * doughnuts
            if sum == dollars:
                return "Yes"
    return "No"

dollars = int(input())
print(check(dollars))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
if N%4 == 0 or N%7 == 0 or N%11 == 0:
    print("Yes")
else:
    for i in range(0,25):
        for j in range(0,14):
            if i*4+j*7 == N:
                print("Yes")
                ans += 1
                break
    if ans == 0:
        print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
if N%4 == 0 or N%7 == 0 or N%11 == 0:
    print("Yes")
else:
    for i in range(1,25):
        for j in range(1,14):
            if i*4+j*7 == N:
                print("Yes")
                ans += 1
                break
    if ans == 0:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 'No'

a = 0
b = 0

for i in range(int(n/4)+1):
	for i in range(int(n/7)+1):
		if 4*a + 7*b == n:
			ans = 'Yes'
			break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

k = 'No'

a = 0
b = 0

while a < int(n/4):
	while b < int(n/7):
		if 4*a + 7*b == n:
			k = 'Yes'
			break
		b += 1
	a += 1

a = 0
b = 0

if k == 'No':
	while b < int(n/7):
		while a < int(n/4):
			if 4*a + 7*b == n:
				k = 'Yes'
				break
			a += 1
		b += 1


print(k)

Submission status: Wrong Answer

Solution code:
N = int(input())

num_set = []
seven_count = 0

while seven_count * 7 < N:
    total = 7 * seven_count
    while total <= N:
        num_set.append(total)
        total += 4
    seven_count += 1

num_set = set(num_set)

if N in num_set:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

def do():
    for i in range(0, N, 4):
        for j in range(0, N, 7):
            if i + j == N:
                print("Yes")
                return
    print("No")

do()

Submission status: Wrong Answer

Solution code:
N = int(input())

def do():
    for i in range(0, N, 4):
        for j in range(0, N, 7):
            if i + j == N:
                print("YES")
                return
    print("NO")

do()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

k = 'NO'

for a in range(int(n/4)+1):
	for b in range(int(n/7)+1):
		if 4*a + 7*b == n:
			k = 'YES'
			break

print(k)

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import copy

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    if N % 11 % 4 % 7 == 0 or N % 11 % 7 % 4 == 0:
        return 'Yes'
    return 'No'


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import copy

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    if N % 4 % 7 == 0 or N % 7 % 4 == 0:
        return 'Yes'
    return 'No'


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)