Problem:


Score : 200 points

Problem Statement

La Confiserie d'ABC sells cakes at 4 dollars each and doughnuts at 7 dollars each.
Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Constraints

N is an integer between 1 and 100, inclusive.

Input

Input is given from Standard Input in the following format:

N

Output

If there is a way to buy some cakes and some doughnuts for exactly N dollars, print Yes; otherwise, print No.

Sample Input 1

11

Sample Output 1

Yes

If you buy one cake and one doughnut, the total will be 4 + 7 = 11 dollars.

Sample Input 2

40

Sample Output 2

Yes

If you buy ten cakes, the total will be 4 \times 10 = 40 dollars.

Sample Input 3

3

Sample Output 3

No

The prices of cakes (4 dollars) and doughnuts (7 dollars) are both higher than 3 dollars, so there is no such way.



Sample input:
11


Sample output:
Yes

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
ans='No'
for i in range(0,25):
    if (n-(i*4)) % 7 == 0:
        ans='Yes'
    if (n-(i*7)) % 4 == 0 and (n-(i*7)) > 0:
        ans='Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
def cal_ans(num):
    for num1 in range(25):
        for num2 in range(15):
            if num1 * 4 + num2 * 7 == num:
                return "yes"
    return "no"


if __name__ == '__main__':
    N = int(input())
    print(cal_ans(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,8):
    if n%(i*4)==0:
        ans = True
        break

    for i in range(1,5):
        if n%(i*7)==0 or n%(i*7)==4:
            ans = True
            break

        for i in range(1,5):
            if n%(i*11)==0 or n%(i*11)==4 or n%(i*11)==7:
                ans = True
                break

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
ans = 0
N = int(input())
for i in range(100):
    if N <= 3 :
        ans += 0
    elif N % 4 == 0 or N % 7 == 0 :
        print("Yes")
        ans += 1
        break
    elif (N-4*i) % 7 == 0 :
        print("Yes")
        ans+=1
        break
    elif (N-7*i) % 4 == 0 :
        print("Yes")
        ans+=1
        break
if ans == 0:
    print("No")

Submission status: Wrong Answer

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

def main():
	n = int(input())
	for i in range(10 ** 6):
		arry = list('{:b}'.format(i))
		ans = 0
		for j in arry:
			if j == '0':
				ans += 4
			else:
				ans += 7
		if ans == n:
			print('Yes')
			exit()
	print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

limit_num_of_four = N//4
for i in range(0,limit_num_of_four+1):
    tmp = 0
    tmp = N - 4*i
    if tmp % 7 ==0 and tmp != 0:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
array = []
for i in range(1, 101, 4):
    for j in range(1, 101, 7):
        array.append(i)
        array.append(j)
if n in array:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    N = int(input())

    r = 'No'

    for i in range(10):
        for j in range(10):
            if 4 * i + 7 * j == N:
                r = 'Yes'
                break

    print(r)

Submission status: Wrong Answer

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

def main():
	n = int(input())
	for i in range(100):
		arry = list('{:b}'.format(i))
		ans = 0
		for j in arry:
			if j == '0':
				ans += 4
			else:
				ans += 7
		if ans == n:
			print('Yes')
			exit()
	print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = input()
N = int(N)
cake = 4
donuts = 7

cost_cake = N % cake
cost_donuts = N % donuts
if N < 3:
    print("No")
elif cost_cake == 0 or cost_donuts == 0:
    print("Yes")
elif cost_donuts % cake == 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%4)%7==3)and(N!=3))or((N%7)%4==0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

k = 0
T = False

while N-(k*7)>0:
    if (N-(k*7))%4 == 0:
        T = True
        break
    k += 1

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

Submission status: Wrong Answer

Solution code:
def cal_ans(_N):
    for num1 in range(25):
        for num2 in range(15):
            if num1 * 4 + num2 * 7 == _N:
                return "yes"
    return "no"


if __name__ == '__main__':
    array = list(map(int, input().split()))
    N = array[0]
    print(cal_ans(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

limit_num_of_four = N//4
for i in range(1,limit_num_of_four+1):
    tmp = 0
    tmp = N - 4*i
    if tmp % 7 ==0:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
for i in range(int(N/4)):
    amount = i * 4
    for j in range(int(N/7)):
        if(j == 0):
            pass
        else:
            amount += 7
        if(amount == N):
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

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

N_init = int(input())

N = N_init
# x mod 7 = y , y mod 4 = 0 -> Yes / not 0 -> No

judge = False
while(N > 0):
   N = N -4
   if N % 7 ==0:
       judge = True
       break
   elif N ==0:
       judge = True
       break

N = N_init
while(N > 0):
   N = N -7
   if N % 4 ==0:
       judge = True
       break
   elif N ==0:
       judge = True
       break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())

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

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
n=int(input())
if n%4==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
        p+=1
    if t:
        print("No")

Submission status: Wrong Answer

Solution code:
num = int(input())
print("Yes" if num % 4 == 0 or num % 7 == 0 or num % 11 == 0 else "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]
seven_four = [x+4 for x in seven]
res = four+seven+four_seven+seven_four


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = int(input())
for i in range(11):
    if num - (4*i +7*(10-i)) == 0:
        print("Yes")
        exit()
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 'No'
if 4 % n == 0:
    ans = 'Yes'
elif 7 % n == 0:
    ans = 'Yes'
else:
    tmp = 4
    while tmp < n:
        if (n - tmp) % 7 == 0:
            ans = 'Yes'
            break
        else:
            tmp += 4
    if ans != 'Yes':
        tmp = 7
        while tmp < n:
            if (n - tmp) % 4 == 0:
                ans = 'Yes'
                break
            else:
                tmp += 7

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

S = N%7
K = (S%4)%2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

Sum = int(input())

r = 0
for i in range(26):
    for k in range(15):
        if 4*i+7*k == Sum:
            r = r +1
        else:
            r = r
if r > 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
def solution():
    n = int(input())
    if n % 7 == 0 or n % 4 == 0:
        return "Yes"
    while n > 0:
        n -= 7
        if n % 4 == 0:
            return "Yes"

    return "No"

print(solution())

Submission status: Wrong Answer

Solution code:
N = int(input())
if 1 <= N <= 100:
    for i in range(0,25):
        for v in range(0,14):
            if (4 * i) + (7 * v) == N:
                print('Yes')
                break
            break
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

l = []

for i in range(1,26):
    t = 4*i
    l.append(t)
    for j in range(1,15):
        t = t  + 7*j
        if t > 100:
            continue
        l.append(t)
    if t > 100:
        continue

if (n in l):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

p = N//7
q = N%7
if p < 1:
	print('No')
	sys.exit()
for i in range(p):
	if q % 4 == 0:
		print('Yes')
		sys.exit()
	else:
		q = (q+7)%4
		if q == 0:
			print('Yes')
			sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
for i in range(int(N/4)):
    amount = (i + 1) * 4
    for j in range(int(N/7)):
        amount += 7
        if(amount == 100):
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 'No'
if 4 % n == 0:
    ans = 'Yes'
elif 7 % n == 0:
    ans = 'Yes'
tmp = 4
while tmp <= n:
    if (n - tmp) % 7 == 0:
        ans = 'Yes'
        break
    else:
        tmp += 4

tmp = 7
while tmp <= n:
    if (n - tmp) % 4 == 0:
        ans = 'Yes'
        break
    else:
        tmp += 7

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
q = 0
flug = 0
while q <= N :
	if N - q % 4 == 0:
		flug = 1
		break
	q = q + 7

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

Submission status: Wrong Answer

Solution code:
n = int(input())
f = 4
s = 7
cnt = 4
if n <= 3:
    print("No")
else:
    while cnt <= n:
        if cnt + s == n:
            print("Yes")
            break
        elif cnt + f == n:
            print("Yes")
            break
        else:
            cnt += f
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
for i in range(int(N/4) + 1):
    amount = (i + 1) * 4
    for j in range(int(N/7) + 1):
        amount += 7
        if(amount == 100):
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

l = []

for i in range(1,26):
    t = 4*i
    l.append(t)
    for j in range(1,15):
        t = t  + 7*j
        if t >= 100:
            continue
        l.append(t)
    if t >= 100:
        continue

if n in l:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >=28:
  print('Yes')
elif N % 4 == 0:
  print('Yes')
elif N % 7 == 0:
  print('Yes')
elif (N-7) % 4 == 0 and N >= 4:
  print('Yes')
elif (N-14) % 4 == 0 and N >= 4:
  print('Yes')
elif (N-21) % 4 == 0 and N >= 4:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
ans='No'
for i in range(0,100):
    if i * 4 > 100:
        break
    if (n-(i*4)) % 7 == 0 and n > i*4:
        ans='Yes'
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
for i in range(int(N/4) + 1):
    amount = i * 4
    for j in range(int(N/7) + 1):
        amount += 7
        if(amount == 100):
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())

if a % 4 and a%7 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if 1 <= N <= 100:
    for i in range(0,25):
        for v in range(0,14):
            if (4 * i) + (7 * v) == N:
                print('Yes')
            break
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

p = N//7
q = N%7
if p < 1:
	print('No')
	sys.exit()
for i in range(p):
	if q % 4 == 0:
		print('Yes')
		sys.exit()
	else:
		q = (q+7)%4
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = "No"
if 3 < N:
    if (N % 4 == 0) or (N % 7 == 0):
        ans = "Yes"
    elif ((N % 4) % 7 == 0) or ((N % 7) % 4 == 0):
        ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

cake = 4
dounatsu = 7

for i in range(1,100):
    for j in range(1,100):
        if cake * i + dounatsu * j > 100:
            break
        if cake * i + dounatsu * j == n:
            print("Yes")
            exit()
        else:
            continue
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
ans='No'
for i in range(0,100):
    if (n-(i*4)) % 7 == 0 and n > i*4:
        ans='Yes'
        break
print(ans)

Submission status: Wrong Answer

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

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

flag = 'No'

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

print(flag)

Submission status: Wrong Answer

Solution code:
N = int(input())
if 1 <= N <= 100:
    for i in range(0,25):
        for v in range(0,14):
            if (4 * i) + (7 * v) == N:
                print('Yes')
                break
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = False

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# vim: set fileencoding=utf-8 :
n = int(raw_input())
flag = 0

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

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
if (N % 7 == 0) or (N % 7 == 4):
  print('Yes')
  exit()
a = int(N / 7)
for i in range(1, a+1):
  N_ = N - 7 * i
  if N_ % 4 == 0:
    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-4*i)//7+1):
        print(4*i, 7*j)
        if 4*i+7*j==n:
            print('Yes')
            exit()
print('No')

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)
            break
    num+=1

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

Submission status: Wrong Answer

Solution code:
N = int(input())

for x1 in range(N // 4):
    for x2 in range(N-(x1+1)*4 // 7):
        if (x1+1)*4+(x2+1)*7 == N:
            print("Yes")
            exit()
        else:
            pass
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')
elif ((n%11)%7)%4 == 0:
    print('Yes')
elif ((n%11)%4)%7 == 0:
    print('Yes')
else:
    print('No')
exit(0)

Submission status: Wrong Answer

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

Y="Yes"
ans="No"

if N<4:
	print(ans)
	exit(0)

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

if ((N % 7) % 4)==0:
	print(Y)
	exit(0)

if ((N % 4) % 7)==0:
	print(Y)
	exit(0)

print(ans)

Submission status: Wrong Answer

Solution code:
# vim: set fileencoding=utf-8 :
n = int(raw_input())
flag = 0
for i in range(n / 4):
    if (n - i * 4) % 7 == 0:
        print("Yes")
        flag = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

b = math.ceil(a/7)
c = math.floor(a/4)

for i in range(b,c+1):
    x = 7*i-a
    y = a-4*i
    if x%3==0 and y%3==0:
        print("Yes")
        break
    if i==c:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(4,101,4):
  for j in range(7,101,7):
    if (i + j) > 100:
      break
    if n == (i + j):
      print('Yes')
      quit()
print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Y="Yes"
ans="No"

if N<4:
	print(ans)
	exit(0)

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

if ((N % 7) % 4)==0:
	print(Y)
	exit(0)

print(ans)

Submission status: Wrong Answer

Solution code:
c = 4 * 7
n = int(input()) % c
i = n
while 0 < i:
    j = i
    while 0 < j:
        j -= 7
        if j == 0:
            print("Yes")
            exit()
    i -= 4
    if i == 0:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 4 == 0 and N > 7:
    print("Yes")
elif N & 7 == 0 and N > 13:
    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(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

cake = 4
dounatsu = 7

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

if n == 0:
  print("Yes")
  sys.exit()

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

print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = [0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100]
c = [0,7,14,21,28,35,42,49,56,63,70,77,84,91,98]
d = 0
if a < 4:
	print("No")
else:
	for i in range(len(b)):
		for j in range(len(c)):
			if b[i] + c[j] >= 101:
				break

			if b[i] + c[j] == a:
				print("Yes")
				d = 1
				break
		if d == 1:
			break
if d == 0:
	print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

i = 0
while n - 7 * i > 0:
     x = n - 7 * i
     if x % 4 ==0:
         print("Yes")
         break
     i += 1
else:
    print("No")

Submission status: Wrong Answer

Solution code:
c = 4 * 7
n = int(input()) % c
i = n
while 0 < i:
    j = i
    while 0 < j:
        print(i, j)
        j -= 7
        if j == 0:
            print("Yes")
            exit()
    i -= 4
    if i == 0:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = "No"

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


print(ans)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
flag=0
for A in range(26):
  for B in range(15):
    if 4*A+7*B==N:
      flag=1
if flag==1:
  print("Yes")
else:
  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]
seven_four = [x+4 for x in four]
res = four+seven+four_seven+seven_four

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if ((((N % 4) % 3) == 0) and (N > 3)) or (N % 7 == 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 < 4:
  ans = 'No'
else:
  num7 = n / 7
  n -= num7*7
  if n % 4 == 0:
    ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())

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

print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
f = 4
s = 7
if n <= 3:
    print("No")
elif n % f == 0:
    print("Yes")
elif n % s == 0:
    print("Yes")
elif n % (f + s) == 0:
    print("Yes")
elif n % f == 3:
    print("Yes")
elif n % s == f:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 3 or N == 5 or N == 6 or N == 9 or N == 10 or N == 13 or N == 17 or N == 19:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
n4 = [i*4 for i in range(101)]
n7 = [i*7 for i in range(101)]
print("Yes" if n%7 in n4 or n%4 in n7 else "No")

Submission status: Wrong Answer

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

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
for i in range(1,26):
    for j in range(1,16):
        tmp = 4*i+7*j
        if tmp <= 100 and tmp == N:
            print("Yes")
            sys.exit(0)
print("No")

Submission status: Wrong Answer

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

b = math.ceil(a/7)
c = math.ceil(a/4)

for i in range(b,c+1):
    x = 7*i-a
    y = a-4*i
    if x%3==0 and y%3==0:
        print("Yes")
        break
    if i==c:
        print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
tmp = [0] * 101
tmp[1] = tmp[2] = tmp[3] = 0
tmp[4] = 1
for k in range(4, 101):
  if tmp[k] == 0:
    continue
  if k + 4 <= 100:
    tmp[k + 4] += 1
  if k + 7 <= 100:
    tmp[k + 7] += 1
ans = 'Yes' if tmp[N] >= 1 else 'No'
print(ans)

Submission status: Wrong Answer

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