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 // 7
a = n % 7
if a == 0:
    print('Yes')
    exit()
else:
    for i in range(m+1):
        if (n - i * 7) % 4 == 0:
            print('Yes')
        exit()
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 4
d = 7

if n % c == 0:
	print("Yes")
	exit()

if n % d == 0:
	print("Yes")
	exit()

while n >= 0:
	if n >= d:
		n = n - d
	elif c <= n and n < d:
		n = n - c
	elif n < c:
		print("No")
		exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 4
d = 7

if n % c == 0:
	print("Yes")
	exit()

if n % d == 0:
	print("Yes")
	exit()

while n != 0:
	if n >= d:
		n = n - d
	elif c <= n and n < d:
		n = n - c
	elif n < c:
		print("No")
		exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 4
d = 7

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

if n % c == 0:
	print("Yes")
	exit()

if n % d == 0:
	print("Yes")
	exit()

while n != 0:
	if n >= d:
		n = n - d
	elif n < d and n >= c:
		n = n - c
	else:
		print("No")
		exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(K) : #108-A
    x = K//2
    if K%2==0 :
        return x**2
    else :
        y = x+1
        return x*y
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

for i in range(25):
        if (N - 4 * i) % 7 == 0:
            accept = True

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
nlist=[1,2,3,5,6,9,13,17]
flag=0

for a in range(len(nlist)):
 if N==nlist[a]:
  flag=1
  break

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

Submission status: Wrong Answer

Solution code:
N = int(input())

while N > 0:
    if N%7 == 0 or N%4 == 0:
        print('yes')
        break
    N -= 7

else :
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

while N > 0:
    if N%7 == 0 or N%4 == 0:
        print('yes')
        break
    N -= 4

else :
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
x = 0
c = 0
d = N - 7 * x
while d >= 0:
  if d % 4 == 0:
    c = 1
    break
  else:
    x += 1
if c == 1:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(N):
    for i in range(26):
        for j in range(20):
            if 4*i + 7*j == N :
                return('Yes') 
            else:
                return('No')

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
n = input()
for i in range(0,101,4):
	if (n-i)%7 == 0:
		print "Yes"
		sys.exit(0)
print "No"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print("No")

Submission status: Wrong Answer

Solution code:
def calc(a):
  for a4 in range(26):
    for a7 in range(16):
      if a4*4+a7*7 == a:
        return "Yes"
  return "No"

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())

flg = False
for i in range(100//4 + 1):
    for j in range(100//7 + 1):
        if i * 4 + j * 7 == n:
            print("YES")
            exit(0)
    if flg:
        break

print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N in [1, 2, 3, 5, 6, 9, 10, 13, 17]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if N%4 == 0:
    print("Yes")
elif N%7 == 0:
    print("No")
else:
    for i in range(1,100):
        for j in range(1,100):
            temp = j*7 +i*4
            if temp == N:
                print("Yes")
                sys.exit()

    print("No")

Submission status: Wrong Answer

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

else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

while N != 0:
    if N >= 11:
        N -= 11
    elif N >= 7:
        N -= 7
    elif N >= 4:
        N -= 4
    else:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())

isExist = False
for i in range(int(n / 7)):
  for j in range(int(n / 4)):
    if (7 * i + 4 * j == n):
      isExist = True
      break
if isExist:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
def f(x):
    if x == 4:
        print('Yes')
        sys.exit()
    elif x == 7:
        print('Yes')
        sys.exit()
    elif x <= 3:
        print('No')
        sys.exit()
    else:
        f(x - 4)
        f(x - 7)
f(N)

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
def f(x):
    if x <= 3:
        print('No')
        sys.exit()
    elif x - 4 == 0:
        print('Yes')
        sys.exit()
    elif x - 7 == 0:
        print('Yes')
        sys.exit()
    else:
        f(x - 4)
        f(x - 7)
f(N)

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
def f(x):
    if x <= 3:
        print('No')
        sys.exit()
    elif x - 4 == 0 or x - 7 == 0:
        print('Yes')
        sys.exit()
    else:
        f(x - 4)
        f(x - 7)
f(N)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

def getList():
    tmpList = []
    for i in range(1, 101):
        if i % 4 == 0:
            tmpList.append(i)
        elif i % 7 == 0:
            tmpList.append(i)
        elif i % 11 == 0:
            tmpList.append(i)
    return tmpList

def solve(N):
    tmpList = getList()
    
    if N in tmpList:
        return "Yes"
    else:
        return "No"
    
if __name__ == "__main__":
    N = int(input())
    print(solve(N))

Submission status: Wrong Answer

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(N):
    for i in range(100):
        for j in range(100):
            if 4*i + 7*j==N:
                return('Yes') 
            else:
                return('No')

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(N):
    if N%4==0 :
        return 'Yes'
    elif N%7==0 :
        return 'Yes'
    elif N%11==0 :
        return 'Yes'
    else :
        return'No'
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#105b
n=int(input())
x = n//4
if n%4==0 or n%7==0:
    print('Yes')
    
else:
    for i in range(x):
        for j in range(x):
            temp=4*i+7*j
            if temp==n:
                print('Yes')
                exit()
print('No')

Submission status: Wrong Answer

Solution code:
#105b
n=int(input())
x = n//4
if n%4==0 or n%11==0:
    print('Yes')
    
else:
    for i in range(x+1):
        for j in range(x+1):
            temp=4*i+7*j
            if temp==n:
                print('Yes')
                exit()
print('No')

Submission status: Wrong Answer

Solution code:
#105b
n=int(input())
x = n//4
if n%4==0 or n%11==0:
    print('Yes')
    
else:
    for i in range(x):
        for j in range(x):
            temp=4*i+7*j
            if temp==n:
                print('Yes')
                exit()
print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
flag = False
for i in range(1,26):
  for j in range(1,16):
    tmp = 4*i + 7*j
    if N == tmp:
      flag = True

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

#表せるのは4,7,11の倍数と11m+4,7
if N % 4 == 0 or (N % 7 == 0 or N % 11 == 0):
    print("Yes")
else:
    if N % 11 == 4 or N % 11 == 7:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
for i in range(int(N/7)):
    print(N / 7*i %4==0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N in [1,2,3, 5, 6, 8, 9, 10 ,13, 17]:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N != 1 or N != 2 or N != 3 or N != 5 or N != 6 or N != 9 or N != 10 or N != 13 or N != 17:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

if N>= 21 or N != 1 or N != 2 or N != 3 or N != 5 or N != 6 or N != 8 or N != 9 or N != 10 or N != 13 or N != 17:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
n=N//7
m=1
k=0
if N%4==0:
    k +=1
if N%7==0:
    k +=1
while m<=n:
    if (N%(7*m))%4==0:
        k +=1
        break
    m +=1
if k!=0:
    print('Yes')
elif N<4:
    print('No')
elif k==0:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
n=N//7
m=1
k=0
if N%4==0:
    k +=1
if N%7==0:
    k +=1
while m<=n:
    if (N%(7*m))%4==0:
        k +=1
        break
    m +=1
if k!=0:
    print('Yes')
elif N<4:
    print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
n=N//7
m=1
k=0
if N%4==0:
    k +=1
while m<=n:
    if N%(7*m)==0:
        k +=1
        break
    if (N%(7*m))%4==0:
        k +=1
        break
    m +=1
if k!=0:
    print('Yes')
elif N<4:
    print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import logging
import time


class Solver:
    def __init__(self):
        self.n = 0

    # 入力
    def input_value(self):
        # self.n = int(input())
        # self.A, self.B = map(int, input().split())
        # self.A = list(map(int, input().split()))
        # self.a, self.b, self.c = map(int, [input() for i in range(4)])
        # self.t = [None] * self.n
        self.n = int(input())

    @staticmethod
    def can_buy(n):
        # logging.debug(input_str)
        for i in range(1, 26):
            for j in range(1, 16):
                if 4 * i + 7 * j == n:
                    return 'Yes'
        return 'No'

        # logging.debug(input_str)

    # def run(self):
    #     if self.n % self.k == 0:
    #         return 0
    #     return 1

    # @staticmethod
    def test(self):
        start_time = time.time()

        assert self.can_buy(11), 'Yes'
        assert self.can_buy(40), 'Yes'
        assert self.can_buy(3), 'No'

        elapsed_time = time.time() - start_time
        logging.debug('elapsed_time: {0}'.format(elapsed_time) + '[sec]')


if __name__ == '__main__':
    logging.basicConfig(level=logging.DEBUG)

    solver = Solver()

    # solver.test()

    solver.input_value()
    ans = solver.can_buy(solver.n)
    # print(str(ans))
    print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
n=N//7
m=1
k=0
if N%4==0:
    k +=1
while m<=n:
    if N%(7*m)==0:
        k +=1
        break
    if (N%(7*m))%4==0:
        k +=1
    m +=1
if k!=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
print(N)
costC=4
costD=7
Flag=False
for i in range(0,100):
    if Flag:
        break

    for j in range(0,100):
     
        costSum=i*costC+j*costD
        if N==costSum:
            Flag=True

if Flag:
    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==13 or n==17:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
if n <= 3 or n==5 or n==9 or n==13:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n=int(input())
if n == 3 or n==5 or n==9 or n==13:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
for a in range(math.floor(n/4)+1):
    if (n-a*4)%7==0:
        print("Yes")
        break
print("No")

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
for a in range(math.floor(100/4)+1):
    for b in range(math.floor((100-a*4)/7)+1):
        if n==a*4+b*7:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 4:
    print('No')
else:
    m = n % 4
    if m == 0 or n >= (4 - m) * 7:
        print(n, 'Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 4:
    print('No')
else:
    m = n % 4
    if n >= (4 - m) * 7:
        print(n, 'Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
result = False
for a in range(25):
    for b in range(14):
        if a * b == N:
            result = True
print("Yes" if result else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = False
if N % 7 == 0 or N % 4 == 0 or N % 11 == 0:
	print('Yes')

else:
	for i in range(1, int(N / 7)):
		if flag == True: break
		for j in range(1, int(N / 4)):
			if i * 7 + j * 4 == N:
				print('Yes')
				flag = True
				break
			elif i * 7 + j * 4 > N:
				break
	print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = False
if N % 7 == 0 or N % 4 == 0 or N % 11 == 0:
	print('Yes')

else:
	for i in range(1, N % 7):
		if flag == True: break
		for j in range(1, N % 4):
			if i * 7 + j * 4 == N:
				print('Yes')
				flag = True
				break
			elif i * 7 + j * 4 > N:
				break
	print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = False
if N % 7 == 0 or N % 4 == 0 or N % 11 == 0:
	print('Yes')

else:
	for i in range(1, N % 7):
		if flag == True: break
		for j in range(1, N % 4):
			if i * 7 + j * 4 == N:
				print('Yes')
				flag = True
				break
	print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
four = [4*i for i in range(1,26)]
seven = [7*i for i in range(1,15)]

exist = False
for f in four:
    for s in seven:
        if f+s == N:
            exist = True
            
if exist:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N % 4 == 0 or N % 7 == 0:
    print("Yes")
elif N < 4:
    print("No")
else:
    while N > 4:
        N = N - 4
        if N % 7 == 0:
            print("Yes")
            break
        else:
            print("No")
            break

Submission status: Wrong Answer

Solution code:
N = int(input())

c, d = 4, 7

def test(n):

    if n < 4:
        return False

    if n == 4 or n == 7:
        return True
    else:
        return test(n - 4) or test(n - 7)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
i=j=0
flag=0
if N%4 == 0 or N%7 ==0:
    print('Yes')
else:
    while i*4 + j*7 <= N:
        i += 1
        while True:
            j += 1
            if i*4 + j*7 == N:
                print('Yes')
                flag = 1
            break
    if flag ==0:
        print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = int(input())
modN = N % 4
if N <=3:
    print("No")
else:
    print("Yes" if modN in [0, 3] else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def canbuy(n):
    for i in range(int(100/7)+1):
        if (n-7*i)>3 and (n-7*i)%4==0:
            return 'Yes'
    return 'No'

n=int(input())
print(canbuy(n))

Submission status: Wrong Answer

Solution code:
def canbuy(n):
    for i in range(int(100/7)):
        if (n-7*i)>3 and (n-7*i)%4==0:
            return 'Yes'
    return 'No'

n=int(input())
print(canbuy(n))

Submission status: Wrong Answer

Solution code:
n = input()
N = int(n)

for x in range(25):
	for y in range(14):
		a = 4*x + 7*y

		if a == N:
			print("Yes")
			break
else:
	print("No")

Submission status: Wrong Answer

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

for w in range(30):
  c = 7 * w
  if c < N:
    a = N - c
  else:
    a = N
    
  b = a % 4
  
  if b == 0:
    print("Yes")
    break
    
  elif w == 29:
    print("No")
    break

Submission status: Wrong Answer

Solution code:
def getinputdata():

    array_result = []    
    array_result.append(input().split(" "))

    flg = True

    try:
        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

n=int(arr_data[0][0])

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

Submission status: Wrong Answer

Solution code:
N = int(input())
dp = [0 for i in range(200)]
for i in range(26):
    dp[4 * i] = 1
for i in range(150):
    dp[i + 7] = max(dp[i + 7], dp[i] + 1)
if(dp[N]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-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 pf(s): return print(s, flush=True)


def main():
    d = [0] * 101
    for i in range(25):
        d[i*4] + 1
    for i in range(7,101):
        if d[i-7] == 1:
            d[i] = 1
    n = I()
    if d[n] == 1:
        return 'Yes'
    return 'No'




print(main())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
def keisan(x, y):
	return y-4*x
no=[]

if a%4==0 or a%11==0:
	print("Yes")
else:
	for i in range(a%4):
		keisan(i, a)
		#print(keisan(i, a))
		if keisan(i, a)%7==0:
			print("Yes")
		else:
			no.append(1)
if sum(no)>0:
	print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
print('YES' if n in [7,14,4,11,8,15,12,16] or n > 17 else 'No')

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    N = int(input())
    for x in range(0, 100):
        y = N - 4 * x
        if y % 7 == 0:
            print ("Yes")
            exit(0)
    print ("No")

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    N = input()
    for x in range(0, 100):
        y = 100 - 4 * x
        if y % 7 == 0:
            print ("Yes")
            exit(0)
    print ("No")

Submission status: Wrong Answer

Solution code:
from sys import stdin
num=int(stdin.readline().rstrip())
ans="No"
if num%7==0|num%4==0:
	ans="Yes"
if num-7>0&(num-7)%4==0:
	ans="Yes"
if num-14>0&(num-14)%4==0:
	ans="Yes"
if num-21>0&(num-21)%4==0:
	ans="Yes"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = []
counter = 0
for i in range(26) :
    for j in range(16) :
        l = 4*i + 7*j
        if l == N :
            print("Yes")
            counter = 1
            break
if counter == 0 :
    print("No")

Submission status: Wrong Answer

Solution code:
a=int(input())
if a==1 or a==2 or a==3 or a==5 or a==6 or a==9 or a==10 or a==13 or a==15 or a==17:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

while N > 0:
    if N % 4 == 0:
        flag = True
        break
    else:
        N -= 7
if flag == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N in [1, 2, 3, 5, 6, 7, 9, 10, 13, 17]:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False

if n<4 and n>101:
    flag = False
else:

    if n%7%4 == 0:
        flag = True

    if n%4%7 == 0:
        flag = True

    if n%4 == 0:
        flag = True

    if n%7 == 0:
        flag = True

    if n%11 ==0:
        flag = True
    
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False

if n<4:
    flag = False
else:

    if n%7%4 == 0:
        flag = True

    if n%4%7 == 0:
        flag = True

    if n%4 == 0:
        flag = True

    if n%7 == 0:
        flag = True

    if n%11 ==0:
        flag = True
    
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False

if n%7%4 == 0:
    flag = True

if n%4%7 == 0:
    flag = True
    
if n%4 == 0:
    flag = True

if n%7 == 0:
    flag = True
    
if n%11 ==0:
    flag = True
    
if flag:
    print("Yes")
else:
    print("No")