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: Accepted

Solution code:
n = input()
print "Yes" if n in [4*x+7*y for x in range(100) for y in range(100)] else "No"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N = int(input())
for x in range(100):
    for y in range(100):
        if x * 4 + y * 7 == N:
            print('Yes')
            sys.exit(0)

print('No')

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
h = list(map(int, input().split()))

INF = 10**9
dp = [INF] * (N + K)
dp[0] = 0
for i in range(N):
    for k in range(1, K+1):
        if i + k >= N:
            break
        dp[i+k] = min(dp[i+k], dp[i] + abs(h[i]-h[i+k]))
print(dp[N-1])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

Solution code:
n = int(input())

a = n // 4
b = n // 7
count = 0

for i in range(a + 1):
    n = n - i * 4
    for j in range(b + 1):
        if 4 * i + 7 * j == n:
            print(yes)
            count += 1
            break
        else:
            pass

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

N=int(input())

for i range(101):
  for j in range(101):
    if 4*i + 7*j == N:
      print('Yes')
      sys.exit()
else:
  print('No')

Submission status: Runtime Error

Solution code:
import sys

N,K = map(int,sys.stdin.readline().rstrip().split())

print(0 if N % K == 0 else 1)

Submission status: Runtime Error

Solution code:
n=int(input())


a=0
for i in　range(0,26):
    for j in range(0,20):
        if 4*i+7*j==n:
            a+=1


if a==0:
    print("N0")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
buy = [false]*1000
buy[0] = true
for i in range(100):
  if buy[i]:
    buy[i+4] = true
    buy[i+7] = true
    
n = int(input())
if buy[n]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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: Runtime Error

Solution code:
N = int(input())

l = []

for i in range(0,26):
  for j in range (0,15):
    k = 4 * i + 7 * j
    l = l.append(k)

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

Submission status: Runtime Error

Solution code:
n = int(input())
for q in range(1, n, 7):
    if q % 4 == 0:
        print("Yes")
        exit(0)
print("No" if (q % 4 != 0) and (q % 7 != 0) else "Yes")

Submission status: Runtime Error

Solution code:
N = int(input())
cakeA = round(N / 4)
cakeB = round(N / 7)
count = 0

for a in round(cakeA):
    for b in round(cakeB):
        if (4 * a)+(7 * b) == N:
            count = count + 1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

flag = False

for i in range(ceil(N/7)+1):
    for j in range(ceil(N/4)+1):
        if flag == True:
            continue
        #print(N - i * 7 - j * 4 )
        if N - i * 7 - j * 4 == 0:
            flag = True

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

Submission status: Runtime Error

Solution code:
for i in range(100):
    for j in range(100):
        if flag == True:
            continue
        print(N - i * 7 - j * 4 )
        if N - i * 7 - j * 4 == 0:
            flag = True

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define rep(i, s, n) for (int i = (s); i < (int)(n); i++)
#define per(i, n, s) for (int i = (n-1); i >= (int)(s); i--)
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<x<<endl
using namespace std;
using ll = long long;
const ll MOD = 1e9+7;
const ll LINF = LLONG_MAX;
const int INF = INT_MAX;

int main() {
    int n; cin>>n;
    rep(i,0,30){
        if((n-4*i)%7==0){
            cout<<"Yes"<<endl;
            return 0;
        }
        if(i*4>n) break;
    }
    cout<<"No"<<endl;
}

Submission status: Runtime Error

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: Runtime Error

Solution code:
X = int(input())

A_ = X//4+1
B_ = X//7+1

ans - 0
for a in range(A_):
  for b in range(B_):
    c = 4*a + 7*b
    if c > X:
      break
    if c == X:
      ans = 1
      break
if ans == 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N=int(input())

if (N%4)==0:
    print("Yes")
    break
elif(N%7)==0:
    print("Yes")
    break
elif(N%11)==0:
    print("Yes")
    break
while N>0:
    i=1
    N=N-11*i
    if(N%4)==0 or (N%7)==0:
        print("Yes")
        break
    i=i+1
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
price = int(input())

top = price//4
for n in range(top+1):
  for m in range(top+1):
    if 4*n + 7*m == price:
      flag = 1
      break

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

Submission status: Runtime Error

Solution code:
price = int(input())

top = price//4
for n in range(top):
  for m in range(top):
    if 4*n + 7*m == price:
      flag = 1
      break

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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:
    continue
else:
  print("No")

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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:
  break
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
for i in range(round(N/4) + 2):
  for j in range(round(N/7) + 2):
	if 4*i + 7*j == N:
	  print("Yes")
	  break

Submission status: Runtime Error

Solution code:
N=int(input())
*H,=map(int,input().split())
RH=H[::-1]

ans='Yes'
i=0
while i+1<=N-1:
    if RH[i+1]-RH[i]==1:
        RH[i+1]-=1
    elif RH[i+1]-RH[i]>=

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(0,N//4):
    if (N - 4*i)%7 == 0:
        print('Yes')
        sys.exit()
print('No')

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
N = map(int, input().split())
N = N[0]
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')
			sys.exit();

print('No')

Submission status: Runtime Error

Solution code:
import sys
N = map(int, '4'.split())
N = N[0]
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')
			sys.exit();

print('No')

Submission status: Runtime Error

Solution code:
N = map(int, input().split())

for i in range(int(100/7)+1):
  for j in range(int(100/4)+1):
    if i*7 + j*4 == N:
      print('Yes')
      return
print('No')

Submission status: Runtime Error

Solution code:
d_cnt =(int(x) for x in input().split()) 

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

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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)):
        if check_amount(i, j, n):
            print('Yes')
            sys.exit()
print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def temp(H):
  ans = - H *0.006
  return ans
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))
TE = list(map(temp,H))
TLA = list(map(lambda x: abs(T + x -A) , TE))
ans=TLA.index(min(TLA))
print(ans+1)

Submission status: Runtime Error

Solution code:
N = int(input())

flag = 0

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

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
n = int(input())
counter = False
#for n in range (0,100):
  for i in range (math.ceil((n+1) / 4) ):
    for j in range (math.ceil((n+1) / 7) ):
      #print(n, i,j)
      if i*4 + j*7 == n:
        counter = True
  if counter == True:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
import math
n = int(input())
counter = False
#for n in range (0,100):
  for i in range (math.ceil((n+1) / 4) ):
    for j in range (math.ceil((n+1) / 7) ):
      #print(n, i,j)
      if i*4 + j*7 == n:
        counter = True
  if counter == True:
    print("Yes")
  else:
   	print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

c = 0

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

print(ans)

Submission status: Runtime Error

Solution code:
print("Yes" if [4*x+11*y for x in range(26) for y in range(9)].count(a) else "NO")

Submission status: Runtime Error

Solution code:
N=int(input())

for i in range(0,N//4):
    if (N-4*i)%7==0:
        print('Yes')
        sys.exit()
        
print('No')

Submission status: Runtime Error

Solution code:
n=int(intput())
cake=4
donuts=7
flag=False
for i in range(n+1):
    if i%4==0:
        flag=True
        break
    elif (n-i)%7==0:
        flag=True
        break
print("Yes" if flag else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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:
            ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
for s in range(n//4+1):
    for t in range(n//7+1):
        if 4*s+7*t==n:
             print("Yes")
            break
        else:
            print("No")

Submission status: Runtime Error

Solution code:
#4と、7
n =int(input())

for i in 16:
  s = n - (i*7)
  if s < 0:
    break
  if s%4==0:
    print("Yes")
    exit()
print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
for f in range(100//4+1):
	for s in range(100//7+1):
    	ans = f*4 + s*7
        if ans == n:
        	print("Yes")
			exit()
print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
 
ans = 0
 
for i in range(100):
    for j in range(100):
        if (i*4) + (y*7) == N:
            ans = ans+1
            

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

Submission status: Runtime Error

Solution code:
N = int(input())
 
ans = 0
 
for i in range(100):
    for j in range(100):
        if (i*4) + (y*7) == N:
            ans = ans+1
            

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

ans = 0

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

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

Submission status: Runtime Error

Solution code:
N = int(input)

ans = 0

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

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

Submission status: Runtime Error

Solution code:
n = int(input())
n = n % 4


for i in range(26):
  n += 4
  if s % 7 == 0:
    print("Yes")
  if i == 25:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
for i in range 26:
  for j in range 14:
    if i+j==N:
      print('Yes')
      break
  else:
    continue
  break
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(inout())
for i in range 26:
  price=4*i
  for j in range 16:
    price+=7*j
    if price==N:
      print('Yes')
      break
print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

Solution code:
N = int(input())

cake_price = 4
donut_price = 7

max_cake = N // cake_price
max_donut = N // donut_price

isJustN = False
if max_cake * cake_price == N or max_donut * donut_price == N:
    isJustN = True
else:
    for c in range(1, max_cake + 1):
        for d in range(1, max_donut + 1):
            total_price = cake_price * c + donut_price * d
            if total_price == N:
                isJustN = True
                break

Result = ''
Result = 'Yes' if isJustN == True else Result = 'No'
print(Result)

Submission status: Runtime Error

Solution code:
import sys
for i in range(100):
    for l in range(100):
        if 4*i + 7*l == int(input()):
            print("Yes")
            sys.exit()
print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
swi = "No"
for a in range(100)：
  if (n - 4＊a) % 7 == 0 and n - 4＊a >= 0:
    swi="Yes"
    break
print(swi)

Submission status: Runtime Error

Solution code:
n=int(input())
swi = "No"
for a in range(100)
  if (n - 4＊a) % 7 == 0 and n - 4＊a >= 0:
    swi="Yes"
    break
print(swi)

Submission status: Runtime Error

Solution code:
n=int(input())
swi = "No"
for a in range(n//4 +1)
  if (n - 4＊a) % 7 == 0 and n - 4＊a >= 0:
    swi="Yes"
    break
print(swi)

Submission status: Runtime Error

Solution code:
#Cakes and Donuts
n = int(input())
print('Yes' if[1 for a in range(n//7+1) for b in range(n//4+1) if a*7+b*4=n] else 'No')

Submission status: Runtime Error

Solution code:
PRICE_CAKE = 4
PRICE_DOUGHNUT = 7

n = int(input())
max_cakes = n // PRICE_CAKES

valid = False
for i in range(max_cakes + 1):
  n_left = n - i * PRICE_CAKE
  if n_left % PRICE_DOUGHNUT == 0:
    valid = True
    break
    
print("Yes" if valid else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
dp = [0 for i in range(100)]
dp[6] = 1
dp[3] = 1
for i in range(100):
  if i>=4 and dp[i-4]==1:
    dp[i] = 1
  if i>=7 and dp[i-7]==1:
    dp[i] = 1
if dp(int(input())-1)==1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
dp = [0 for i in range(100)]
dp[6] = 1
dp[3] = 1
for i in range(100):
  if i>=4 and dp[i-4]==1:
    dp[i] = 1
  if i>=7 and dp[i-7]==1:
    dp[i] = 1
if dp(int(input()-1))==1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import sys


n = int(input())

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
N = int(input())

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

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

Submission status: Runtime Error

Solution code:

N = int(input())

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
for cake in range(0,n+1,4):
    for donatsu in range(0,n+1,7):
        count += 1
print("Yes") if count >= 1 else print("No")
n = int(input())
count = 0
for cake in range(0,n+1,4):
    for donatsu in range(0,n+1,7):
        if donatsu + cake == 0:
            count += 1
print("Yes") if count >= 1 else print("No")

Submission status: Runtime Error

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    r = II()
    if r < 1200:
        print("ABC")
    elif r < 2800:
        print("ARC")
    else:
        print("AGC")
    return

#B
def B():
    n = II()
    dp = [0] * (n + 1)
    dp[4] = 1
    dp[7] = 1
    for i in range(8,n + 1):
        if dp[i - 4] or dp[i - 7]:
            dp[i] = 1
    print(["No","Yes"][dp[n]])
    return

#C
def C():
    d, g = LI()
    pc = LIR(d)
    ans = float("INF")
    tokumono = list(itertools.product((0, 1), repeat=d))
    for toku in tokumono:
        ansa = 0
        ansb = 0
        for i in range(len(toku)):
            if toku[i] == 1:
                ansa += pc[i][0]
                ansb += pc[i][0] * (i + 1) * 100 + pc[i][1]
        for k in range(len(toku) - 1, -1, -1):
            if toku[k] == 0:
                for i in range(pc[k][0] + 1):
                    if i == pc[k][0]:
                        ansb += pc[k][1]
                    if ansb >= g:
                        ans = min(ans, ansa)
                        break
                    ansa += 1
                    ansb += (k+1) * 100
                break
    print(ans)
    return

#D
def D():
    N, X = LI()
    def dfs(n, x):
        #print(n, x)
        if x == 1 and n > 0:
            return 0 
        elif x < 2 ** (n + 1) - 1:
            return dfs(n - 1, x - 1)
        elif x == 2 ** (n + 1) - 1:
            return 2 ** n 
        elif x == 2 ** (n + 2) - 3:
            return 2 ** (n + 1) - 1
        else:
            return dfs(n - 1, x - 2 ** (n + 1) + 1) + 2 ** n 
    a = dfs(N, X)
    print(a)
    return

#Solve
if __name__ == '__main__':
    B()

Submission status: Runtime Error

Solution code:
N = int(input())
multiple_4 = [x*4 for x in range(101) if x >= 1 and x <= 25]
multiple_7 = [x*7 for x in range(101) if x >= 1 and x <= 14]
multiple_4_7 = [x*4+7 for x in range(101) if x >= 1 and x <= 23]
multiple_7_4 = [x*7+4 for x in range(101) if x >= 1 and x <= 23]
tmp = []
for i in range(10):
  for j in range(10):
    solve = (4*(i+1))+(7*(j+1))
    if solve <= 100:
      tmp.append(solve)
multiple_other = sorted(list(set(tmp)))
  if N in multiple_4 or N in multiple_7 or N in multiple_4_7 or N in multiple_7_4 or N in multiple_other:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
multiple_4 = [x*4 for x in range(101) if x >= 1 and x <= 25]
multiple_7 = [x*7 for x in range(101) if x >= 1 and x <= 14]
multiple_4_7 = [x*4+7 for x in range(101) if x >= 1 and x <= 23]
multiple_7_4 = [x*7+4 for x in range(101) if x >= 1 and x <= 23]
if N in multiple_4 or N in multiple_7 or N in multiple_4_7 or N in multiple_7_4:
  print(N, "Yes")
  continue
else:
  print(N, "No")
  continue

Submission status: Runtime Error

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