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())
for i in range(50):
    for j in range(50):
        if n==4*i+7*j:
            print("Yes")
            break
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

M=N//7

flag=0
for i in range(M):
  #print(N-i)
  if (N-i*7)%4==0:
    flag=1
    break
else:
  if N==4 or N==7:
    flag=1

print('Yes' if flag==1 else 'No')

Submission status: Wrong Answer

Solution code:
N = int(input())

M=N//7

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
icase=0
if icase==0:
    n=int(input())
    for dornt in range(0,n,7):
        for cake in range(0,n,4):
            if dornt+cake==n:
                print("Yes")
                break
        if dornt+cake==n:
            break
    if dornt+cake!=n:
        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:
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 % 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+1):
  for j in range(n+1):
    if 4*(i+1)+7*(j+1) == n:
      print('Yes')
    else:
      print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())
t=0
while x>=0:
  if x%7==0:
    t=1
  x-=4
if t==0:
  print('No')
else: print('yes')

Submission status: Wrong Answer

Solution code:
x=int(input())
t=0
while x>=0:
  if x%7==0:
    t+=1
  x-=4
print(t)

Submission status: Wrong Answer

Solution code:
x=int(input())
t=0
while x>0:
  if x%7==0:
    t+=1
  x-=4
print(t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

sum = 0
flag = 0


a = int(N / 7)
re = N % 7

if re == 0 and N != 0:
    print('Yes')
    flag += 1
else:
    for i in range(a+1):
        sum = 7 * i
#        print(sum)
        while sum<N:
            sum += 4
#            print(sum)
            if sum == N:
                print('Yed')
                flag += 1
        if flag == 1:
            break

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

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
ans = 0
def dfs(n):
    if n == N:
        sys.exit()
    if n > N:
        return

    dfs(n+4)
    dfs(n+7)

dfs(0)
print('No')

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
ans = 0
def dfs(n):
    print(n)
    if n == N:
        sys.exit()
    if n > N:
        return

    dfs(n+4)
    dfs(n+7)

dfs(0)
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake*i + donut*j):
            ac == True
            break
if ac:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

n=N//4
flag=0
for i in range(n):
  if (N-i*4)%7==0:
    flag=1

print('Yes' if flag==1 else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

sum = 0
flag = 0


a = int(N / 7)
re = N % 7

if re == 0 and N != 0:
    print('Yes')
    flag += 1
else:
    for i in range(a+1):
        sum = 7 * i
#        print(sum)
        while sum<N:
            sum += 4
#            print(sum)
            if sum == N:
                print('Yse')
                flag += 1
        if flag == 1:
            break

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

Submission status: Wrong Answer

Solution code:
N = int(input())

sum = 0
flag = 0

a = int(N / 7)
re = N % 7

if re == 0:
    print('Yes')
    flag += 1
else:
    for i in range(a+1):
        sum = 7 * i
#        print(sum)
        while sum<N:
            sum += 4
#            print(sum)
            if sum == N:
                print('Yse')
                flag += 1
        if flag == 1:
            break

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 'No'
while n > 0:
    if n % 4 == 0:
        ans = 'Yes'
        break
    n -= 7

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 'No'
while n > 0:
    n -= 7
    if n >= 0 and n % 4 == 0:
        ans = 'Yes'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
f = True
while(n>0):
    if(n%4 == 0):
        print("Yes")
        f = False
        break
    n -= 7
if(f):
    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())
for i in range(n//4):
  if (n-4*i)%7 == 0:
    print('Yes')
    exit()
print('No')

Submission status: Wrong Answer

Solution code:
import math
a=int(input())
b_4 = math.ceil(a/4)
b_7 = math.ceil(a/7)

count =0
for i in range(b_4+1):
    for j in range(b_7+1):
        
        if (4*i+j*7) == a:
            count += 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
X = N // 4
Z = N // 7
Y = sum(4*a + 7*b == N for a in range(X) for b in range(Z))
if (Y != 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
X = N // 4
Y = sum(4*a + 7*b == N for a in range(X) for b in range(X))
if (Y != 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 4 == 0 or N % 7 == 0:
  ans = "Yes"
elif N == 0:
  ans = "No"
else:
  t = 0
  i = 1
  while t == 0:
    x = (N-7*i)/4
    if x == int(x):
      t += 1
    else:
      i += 1
  if t == 1:
    ans = "Yes"
  else:
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
t = 0
if N % 4 == 0 or N % 7 == 0:
  ans = "Yes"
elif N == 0:
  ans = "No"
else:
  t = 0
  for i in range(1,N//7):
    x = (N-7*i)/4
    if x == int(x):
      t += 1
    else:
      continue
  if t > 0:
    ans = "Yes"
  else:
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
t = 0
if N % 4 == 0 or N % 7 == 0:
  ans = "Yes"
else:
  t = 0
  for i in range(1,N//7):
    x = (N-7*i)/4
    if x == int(x):
      t += 1
    else:
      continue
  if t > 0:
    ans = "Yes"
  else:
    ans = "No"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
a=0
b=0
l=[]
for i in range(1,100//4+1):
    l.append(i*4)
for i in range(1,100//7+1):
    l.append(i*7)
for i in range(1,100//11+1):
    l.append(i*11)
    l.append(i*11+4)
    l.append(i*11+7)

#l.sort()
#print(l)
if N in l:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
a=0
b=0
l=[]
for i in range(1,100//4+1):
    l.append(i*4)
for i in range(1,100//7+1):
    l.append(i*7)
for i in range(1,100//11+1):
    l.append(i*11)

#l.sort()
#print(l)
if N in l:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
a=0
b=0
l=[]
for i in range(1,100//4):
    l.append(i*4)
for i in range(1,100//7):
    l.append(i*7)
for i in range(1,100//11):
    l.append(i*11)

#l.sort()
#print(l)
if N in l:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

cake = 4
donut = 7
ac = False

for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
        break
        
if ac:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

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

if ans > 0:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import sys

def resolve():
    N = int(input())
    for i in range(4, 100, 4):
        if N == i:
            print("Yes")
            return
        for j in range(7, (100//7), 7):
            if N == j:
                print("Yes")
                return
            if N == i + j:
                print("Yes")
                return
    print("No")

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

sum = 0
for i in range(30):
    for j in range(20):
        total = 4*i + 7*j
        if total == N:
            sum += 1


print(sum)

Submission status: Wrong Answer

Solution code:
import copy

def CakesandDonuts(n):

    ans = "No"
    a = copy.copy(n)

    if n % 7 == 0 or n % 4 == 0:
        ans = "Yes"
    else:
        while a > 0:
            n -= 7
            a -= 4
            if n % 4 == 0 or a % 7 == 0:
                ans = "Yes"

    return ans

def main():
    n = int(input())
    print(CakesandDonuts(n))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import copy

def CakesandDonuts(n):

    ans = "No"
    a = copy.copy(n)

    if n % 7 == 0 or n % 4 == 0:
        ans = "Yes"
    else:
        while a < 0:
            n -= 7
            a -= 4
            if n % 4 == 0 or a % 7 == 0:
                ans = "Yes"

    return ans

def main():
    n = int(input())
    print(CakesandDonuts(n))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def CakesandDonuts(n):

    return "Yes" if n % 4 == 0 or n % 7 == 0 or ((n // 4) == 1 and (n % 4) % 3 == 0) or (n % 7) % 4 == 0 else "No"

def main():
    n = int(input())
    print(CakesandDonuts(n))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def CakesandDonuts(n):

    return "Yes" if n % 4 == 0 or n % 7 == 0 or (n % 4) % 3 == 0 or (n % 7) % 4 == 0 else "No"

def main():
    n = int(input())
    print(CakesandDonuts(n))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def CakesandDonuts(n):

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

def main():
    n = int(input())
    print(CakesandDonuts(n))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
for x in range(26):
    for y in range(15):
        if 4*x + 11*y == n:
            print('Yes')
            quit()
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(i, j)
if cnt >= 1:
    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 i * j == n:
            cnt += 1
if cnt >= 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

n = int(input())
flag = False
for i in range(-(-n // 4)):
    for j in range(-(-n // 7)):
        if n == 4 * i + j * 7:
            flag = True
            break

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

Submission status: Wrong Answer

Solution code:
d_cnt =int(input())

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

Submission status: Wrong Answer

Solution code:
d_cnt =int(input())

if d_cnt//4==0 or d_cnt//7==0 or d_cnt//11:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:

n=int(input())

for i in range(0,n+1) :
    i +=4
    for j in range(0,n+1):
        j+=7
        if i + j == n:
            print('Yes')
            exit()

print("No")

Submission status: Wrong Answer

Solution code:

n=int(input())

for i in range(n) :
    i +=4
    for j in range(n):
        j+=7
        if i + j == n:
            print('Yes')
            exit()

print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
if n==1 or n==3 or n==2 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:
n = int(input())

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

Submission status: Wrong Answer

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

for i in range(N//4+1):
  for j in range(N//7+1):
    if 4*i+7*j==N:
      print("Yes")
      flag=True
      break

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

Submission status: Wrong Answer

Solution code:
def check_pay(N):
    for i in range(0,int(N/4)):
        for j in range(0,int(N/7)):
            if i*4+j*7 == N:
                print("Yes")
                return
    print("No")
check_pay(int(input()))

Submission status: Wrong Answer

Solution code:
def check_pay(N):
    for i in range(0,N,4):
        for j in range(N-i,N,7):
            if i+j == N:
                print("Yes")
                return
    print("No")
check_pay(int(input()))

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
for i in range(N//4):
    if (N-4*i) % 7 == 0:
        flag = True
        break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys


def main():
    n = int(input())
    a = n % 7 + 1
    for i in range(a):
        mod = n - i*7
        if mod < 0:
            break
        if mod > 0 and mod % 4 == 0:
            print('Yes')
            sys.exit(0)
    print('No')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys


def main():
    n = int(input())
    a = n // 7 + 1
    for i in range(a, 0, -1):
        mod = n - i*7
        if mod > 0 and mod % 4 == 0:
            print('Yes')
            sys.exit(0)
    print('No')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
for i in range(26):
    for j in range(15):
        if 4*i+7*j == N:
            print("Yes")
            count += 1
if count == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
for i in range(26):
    for j in range(15):
        if 4*i+7*j == N:
            print("Yes")
            print(i,j)
            count += 1
if count == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
for i in range(26):
  if (n - 4 * i ) % 7 or n - 4 * i >= 0:
    continue
  else:
    print("Yes")
    sys.exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n<4:
  print("No")
  exit()

if n//7 % 4 == 0:
  print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

for i in range(25):
    for j in range(15):
        if N == 4*i + 7*j:
            print('Yes')
            break

print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())

while n>0:
    if n%4==0:
        print("Yes")
        exit()
    else:
        n-=7

print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = [1 for x in range((n+6)//7) if (n-(7*x))%4 == 0]
if sum(ans) != 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = int(input())
while s >0:
  if s%7 == 0:
    print('Yes')
    break
  s -= 4
    
if s<0:
  print('No')

Submission status: Wrong Answer

Solution code:
s = int(input())
while s >0:
  s = s-4
  if s%7 == 0:
    print('Yes')
    break
    
if s<0:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():
    n=int(input())
    if n%7==0  or (n%7)%4==0 or n%4==0 or (n%4==3 and n//4>=1):
        print('Yes')

    else:
        print('No')


resolve()

Submission status: Wrong Answer

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():
    n=int(input())
    if n%7==0  or (n%7)%4==0 or n%4==0 or (n%4==3 and n>=7):
        print('Yes')

    else:
        print('No')


resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())
is_equal = 'No'
for r in range(n//4 + 1):
    sum_4 = r * 4
    for r_2 in range(n//7 + 1):
        sum_7 = r * 7
        if sum_4 + sum_7 == n:
            is_equal = 'Yes'
print(is_equal)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
for n4 in range(N//4+1):
  if (N-n4)%7 == 0:
    print("Yes")
    exit()
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:
import sys


CAKE = 4
DOUNAT = 7


def check_amount(i, j, n):
    return i*4 + j*7 == n


n = int(input())
count = 0
for i in range(int(n/CAKE+1)):
    for j in range(int(n/DOUNAT+1)):
        print(i, j)
        if check_amount(i, j, n):
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input()) # 1~100ドル

CAKE = 4
DONUTS = 7

ans = "No"
for i in range(N//CAKE):
  for j in range(N//DONUTS):
    total = CAKE*i + DONUTS*j
    if total == N:
      ans = "Yes"
      break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = False
for c in range(1,101):
    for d in range(1,101):
        if (4 * c) + (7 * d) == n:
            ans = True
            break

if ans:
    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:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    flg=0
    for i in range(n//7):
        if (n-i*7)%4==0:
            flg=1
    if flg==1:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n // 4
b = n // 7

print("Yes" if any([(n - 4*i) % 7 == 0 for i in range(a)] + [(n - 7*i) % 4 == 0 for i in range(b)]) else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
cnt=0
for i in (0,101):
    for j in (0,101):
        if 4*i+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 (1,101):
    for j in (1,101):
        if 4*i+7*j==n:
            cnt+=1
if cnt==0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
print('YNeos'[int(input()) in [1,2,3,5,6,0,10,13,17]::2])

Submission status: Wrong Answer

Solution code:
print('YNeos'[int(input()) not in [1,2,3,5,6,9,10,13,17]::2])

Submission status: Wrong Answer

Solution code:
import sys
n = int(input()) 
i = 0 
j = 0
while(i < 100):
    while(j < 100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()
        j+= 1
    i+= 1

print("No")

Submission status: Wrong Answer

Solution code:
import sys
n = int(input()) 
i = 0 
j = 0
while(i < 100):
    while(j < 100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()
        j+= 1
        i+= 1

print("No")

Submission status: Wrong Answer

Solution code:
#105_B
N=int(input())
flg=False
for i in range(0,N//7+1):
    x=N
    x=x-7*i
    if N%4==0:
        flg=True
        break
print('Yes' if flg else 'No')

Submission status: Wrong Answer

Solution code:
#105_B
N=int(input())
flg=False
for i in range(0,N//7+1):
    N=N-7*i
    if N%4==0:
        flg=True
        break
print('Yes' if flg else 'No')

Submission status: Wrong Answer

Solution code:
#105_B
N=int(input())
flg=False
for i in range(0,N//4+1):
    N=N-4*i
    if N%7==0:
        flg=True
        break
print('Yes' if flg else 'No')

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
for i in range(1, n):
    for j in range(1, n):
        if i*4+j*7 == n:
            print("Yes")
            quit()
        if i*4+j*7 >= n:
            break
print("No")

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
for i in range(math.ceil(n/4)):
    for j in range(n):
        if i*4+j*7 == n:
            print("Yes")
            quit()
        if i*4+j*7 >= n:
            break
print("No")

Submission status: Wrong Answer

Solution code:
def check(n):
    for i in range( n // 7 + 1 ):
        for j in range( n // 4 + 1 ):
            if (i*7 + i*4) == n:
                print("Yes")
                return

    print("No")
    return


n = int(input().strip())
check(n)

Submission status: Wrong Answer

Solution code:
n = int(input())
lista = [4*(i+1) for i in range(100//4)]
listb = [7*(i+1) for i in range(100//7)]
flag = False
for i in lista:
    for j in listb:
        if i+j == n:
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt = 0
for k in range(n):
    for j in range(n):
        if 4*k+7*j == 11:
            cnt += 1
if n < 4 or cnt == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())

count=0

for i in range(N//7+1):
  temp = N - i*7
  if temp == 0:
    print("Yes")
  elif temp >0:
    for j in range((N-7*i)//4+1):
      tempJ = temp - j*4
      if tempJ == 0:
        print("Yes")
      elif tempJ >0:
        continue
      else:
        print("No")
  else:
      print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

count=0

for i in range(N//7 +1):
  temp = N - i*7
  if temp == 0:
    print("Yes")
  elif temp >0:
    for j in range((N-7*i)//4+1):
      tempJ = temp - j*4
      if tempJ == 0:
        print("Yes")
      elif tempJ >0:
        continue
      else:
        print("No")
  else:
      print("No")

Submission status: Wrong Answer

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