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())
m = n
ret = "No"
while(m > 0):
  if m % 4 == 0:
    ret = "Yes"
    break
  else:
    m = m - 7
print(ret)

Submission status: Wrong Answer

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

lst = [4, 7]

num = 11

while num <= 100:

    for elem in lst:
        if elem + 4 == num or elem + 7 == num:
            lst.append(num)
    num+=1

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

Submission status: Wrong Answer

Solution code:
N = int(input())


while(N > 0):
	if not N % 4:
		print("Yes")
		break

	N -= 7
else:
	print("No")

Submission status: Wrong Answer

Solution code:
a=int(input())
if a<4:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())
# N, K = map(int, input().split())
# c = list(map(int, input().split()))
# d = [list(map(int, input().split())) for _ in range(N)]
# s = input()


ans = "Yes"

if N < 4:
    ans = "No"
elif 5<=N<=6:
    ans = "No"
elif 9<=N<=10:
    ans = "No"
elif 13<=N<=14:
    ans = "No"
elif 17==N:
    ans = "No"
elif 19==N:
    ans = "No"



print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print 'No'

Submission status: Wrong Answer

Solution code:
N=input()
for x in range(1,26):
	for y in range(1,16):
		if N==4*x+7*y:
			print "Yes"
			quit()
else:
	print "No"

Submission status: Wrong Answer

Solution code:
#coding:utf-8

def inpl(): return list(map(int, input().split()))


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

print(ans)

Submission status: Wrong Answer

Solution code:
n = input()

flag = False

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())


check=0
for i in range(25):
    if (N-i*4)/7>=0 and (N-i*4)%7==0:
        check=1
        print(i,(N-i*4)//7)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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')
exit(0)

Submission status: Wrong Answer

Solution code:
N = int(input())

r = N // 7

for i in range(r+1):
    if (N - 7*i) % 4 == 0:
        print('Yes')
        break
else:
    print('N0')

Submission status: Wrong Answer

Solution code:
a=int(input())

b=int(a/7)
c=int(a/4)

for i in range(b):
    for j in range(c):
        if 7*b+4*c==a:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
a=int(input())
if a<8:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
a = int(input())
max_i = a // 7

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

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
num = 0
while(True):
    if (N - num*4) % 7 == 0:
        print("Yes")
        break
    else:
        if N < num * 4:
            break
    num+=1

Submission status: Wrong Answer

Solution code:
a = 4
b = 7
N = int(input())

value = N % a

if value % 7 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def abc105_b():
    n = int(input())
    for i in range(15):
        for j in range(26):
            if n == (i*7+j*4):
                return "YES"
    return "NO"


print(abc105_b())

Submission status: Wrong Answer

Solution code:
def solve(n):
    for i in range(n // 4):
        if (n - i * 4) % 7 == 0:
            return "Yes"
    return "No"

if __name__ == "__main__":
    n = int(input())
    print(solve(n))

Submission status: Wrong Answer

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

for i in range(4):
    if (n-4*i)>=0 and (n-4*i)%7 == 0:
        print("Yes")
        f = 1
if f == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

able = False


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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

k = N//4
m = N%4
if(m == 0):
  print("Yes")
elif(m == 1):
  if(k>=5):
    print("Yes")
  else:
    print("No")
elif(m==2):
  if(k>=3):
    print("Yes")
  else:
    print("No")
elif(m==3):
  if(k>=2):
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

cake = 4
dounatsu = 7

if (n%cake)%dounatsu == 0 or (n%dounatsu)%cake == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while n > 0:
    if n % 4 == 0:
        flag = True
        break

    n = n - 7

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

Submission status: Wrong Answer

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

n = int(input())

res = False
for i in range(30):
    for j in range(20):
        if i * 4 + j + 7 == n:
            res = True

if res == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

r = N // 7

for i in range(r+1):
    if (N - 7*i) % 4 == 0:
        print('No')
        break
else:
    print('N0')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print 'No'

Submission status: Wrong Answer

Solution code:
N = int(input())

x = 0

while (N - 7*x) > 0:
    if (N - 7*x) % 4 == 0:
        print('Yes')
        exit()
    x += 1
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = 1
for i in range(N // 7):
  if (N - 7 * i) % 4 == 0:
    print("Yes")
    flag = 0
    break
    
if flag:
  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 i * 4 + j * 7 == 0:
            flag = True

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

Submission status: Wrong Answer

Solution code:
N = int(input())

for i in range(1, 101):
    for j in range(1, 101):
        if i * 4 + j * 7 == N:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
four = [x for x in range(0, 101, 4)]
seven = [x for x in range(0, 101, 7)]
four_seven = [x+7 for x in four]
res = four+seven+four_seven

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

Submission status: Wrong Answer

Solution code:
N=int(input())


check=0
for i in range(25):
    if (N-i*4)/7>0 and (N-i*4)%7==0:
        check=1

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
flg = True
while(flg):
    for a in range(0,N//4 + 1):
        for b in range(0,N//7 + 1):
            total = 4*a + 7*b
            if total == N:
                flg = False
                break
if(flg):
    print('No')
else:
    print('Yes')

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
flg = True
while(flg):
    for a in range(0,N):
        for b in range(0,N):
            total = 4*a + 7*b
            if total == N:
                flg = False
                break
if(flg):
    print('No')
else:
    print('Yes')

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
box=[]
for i in range(1,101):
    if i%11==0 or i%4==0 or i%7==0:
        box.append(i)

for i in box:
    if i+4 not in box:
        box.append(i+4)
    if i+7 not in box:
        box.append(i+7)
    if i+11 not in box:
        box.append(i+11)
        
print("Yes" if n in box else "No")

Submission status: Time Limit Exceeded

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<26:
        if (n-(4*p))%7 ==0:
            t=False
            print("Yes")
            break
    if t:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
# 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
    if t:
        print("No")

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
i = 0
flag = False
while(7*i<=n):
  if (n-7*i)%4 == 0:
    flag = True
    break
if flag:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    for i in range(30):
        nokori = N - 7 * i
        if nokori >= 0 and nokori % 4 == 0:
            print("Yes")
            return
    print("No")
    return

main()

Submission status: Accepted

Solution code:
def answer(n: int) -> str:
    for i in range(n // 4 + 1):
        for j in range(n // 7 + 1):
            if n == i * 4 + j * 7:
                return 'Yes'

    return 'No'


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
if N in [1,2,3,5,6,9,10,13,17]:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N = int(input())

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

print("No")

Submission status: Accepted

Solution code:
N = int(input())
for i in range(N):
    for j in range(N):
        if 4 * i + 7 * j > N:
            break
        elif 4 * i + 7 * j == N:
            print('Yes')
            exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())

if n >= 18:
    print("Yes")
    exit()

ans_list = [4,7,8,11,12,14,15,16]

if n in ans_list:
    print("Yes")
    exit()

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
for c4 in range(26):
    for c7 in range(16):
        c = 4*c4 + 7*c7
        if c == N:
            print('Yes')
            exit()
print('No')

Submission status: Accepted

Solution code:
n=int(input())
if n==4 or n==7 or n==8 or n==11 or n==12 or n==15 or n==16 or n>=18:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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")
            exit()
print("No")

Submission status: Accepted

Solution code:
N = int(input())
CA = 4
DO = 7

for i in range(25):
    for j in range(15):
        Z = CA * i + DO * j
        if Z == N:
            print("Yes")

            exit()
            
print("No")

Submission status: Accepted

Solution code:
n = int(input())
res = "No"
if n % 4 == 0:
  res = "Yes"
while n > 0:
  if n % 7 == 0:
    res = "Yes"
    break
  n -= 4
print(res)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    cakes = range(n // 4 + 1)
    donuts = range(n // 7 + 1)

    for i in cakes:
        for j in donuts:
            if 4 * i + 7 * j == n:
                print("Yes")
                exit()
    print("No")


main()

Submission status: Accepted

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

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(25):
  for j in range(14):
    if i*4 + j*7 == N:
      print("Yes")
      c += 1 
      exit()
    else:
      pass

if c == 0:
   print("No")
else:
  pass

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

c=0
for i in range(0,n//4+1):
  for j in range(0,n//7+1):
    if 4*i+7*j==n:
      c+=1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

dp = [False] * (n + 1)
dp[0] = True
for i in range(n-3):
    if dp[i]:
        dp[i+4] = True
for i in range(n-6):
    if dp[i]:
        dp[i+7] = True

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

cake = 4
# cake max 25
donatu = 7
# donatu max 14

jage = "No"
for d in range(15):
    for c in range(26):
        if cake * c + donatu * d == N:
            jage = "Yes"
print(jage)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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')
      exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())

for i in range(26):
  for j in range(15):
    if 4 * i + 7 * j == n:
      print('Yes')
      quit()
print('No')

Submission status: Accepted

Solution code:
N = int(input())

for i in range(26):
    for j in range(16):
        if 4 * i + 7 * j == N:
            print('Yes')
            exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())

if n >= 18:
    print('Yes')
elif n % 4 == 0 or n % 7 == 0:
    print('Yes')
elif n - 7 >= 0 and (n - 7) % 4 == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
def f():
    for i in range(100):
        for j in range(100):
            if 4*i + 7*j == n:
                return "Yes"
    return "No"
print(f())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    s = set()

    for i in range(1000):
        for j in range(1000):
            s.add(i * 4 + j * 7)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = 'No'

for i in range(26):
    for j in range(16):
        total = 4*i +7*j
        if total == n:
            s = 'Yes'
            break
    if total ==n:
        break
print(s)

Submission status: Accepted

Solution code:
import sys
n = int(sys.stdin.readline().rstrip("\n"))
l = [False]*101
for a in range(26):
    for b in range(15):
        if 0<(4*a+7*b)<=100:
            l[4*a+7*b] = True
if l[n]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
x = 100//7+2
for i in range(x):
    for j in range(x):
        if 4*i+7*j == n:
            print("Yes")
            break
    else:
        continue
    break
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
f = n // 4
s = n // 7

flag = False
for i in range(f + 1):
    for j in range(s + 1):
        total = i * 4 + j * 7
        if total == n:
            flag = True
            break

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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')
            exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())

for i in range(n):
    j = 0
    while 4*i + 7*j <= 100:
        if 4*i + 7*j == n:
            print('Yes')
            exit()
        else:
            j += 1
print('No')

Submission status: Accepted

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

print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = "No"

for i in range(n):
    for j in range(n):
        if 4*i + 7*j == n:
            s = "Yes"
            break
        
print(s)

Submission status: Accepted

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

N = int(input())

cake = 4
donuts = 7

ans = 'No'
for i in range(N//donuts+1):
    reminder = N-i*donuts
    if reminder % cake == 0 or reminder==0:
        ans = 'Yes'
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = "No"

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n =int(input())

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

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
i = 0
f = 0
while i <= N:
  if (N - i) % 7 == 0:
    print("Yes")
    f = 1
    break
  i += 4
if f == 0:
  print("No")

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    for i in range(0,N+1,7):
        if (N-i)%4==0:
            print('Yes')
            break
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

ans = 0
for i in range(100):
    if n - 4 * i >= 0 and ( n - 4 * i )% 7 == 0:
        ans += 1

#print(ans)

if ans >= 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8


def main():
    n = int(input())
    max_k = n // 7
    max_d = n // 4
    for i in range(max_k + 1):
        for j in range(max_d + 1):
            if i * 7 + j * 4 == n:
                print("Yes")
                return
    print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    N = int(input())
    for f in range((N // 4) + 1):
        for s in range((N // 7) + 1):
            if 4 * f + 7 * s == N:
                print("Yes")
                exit(0)
    print("No")


main()

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

max_4 = 25
max_7 = 14

answer = 'No'
for i in range(max_4 + 1):
  for j in range(max_7 + 1):
    sum = 4 * i + j * 7
    if sum == N:
      answer = 'Yes'
      break
  if answer == 'Yes':
    break

print(answer)

Submission status: Accepted

Solution code:
ans = int(input())
loopFlg = True

for i in range(26):
  if loopFlg == False:
    break
  for j in range(15):
    if 4*i + 7*j == ans:
      loopFlg = False

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
for x in range(n + 1):
  for y in range(n + 1):
    if x * 4 + y * 7 == n:
      print("Yes")
      exit()
print("No")

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()

    is_ok = False
    for i in range(N // 7 + 1):
        if (N - 7 * i) % 4 == 0:
            is_ok = True

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
N = int(input())

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

print("No")

Submission status: Accepted

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