CodeEff/ECCO huggingface dataset:
# Original solution
def ok(n):
    v=n%10
    ret=True
    while n>0:
        ret&=n%10==v
        n//=10
    return ret

N=int(eval(input()))
while not(ok(N)):
    N+=1
print(N)

# Optimized solution
n=int(eval(input()))
ans=0
while ans<n:
    ans+=111
print(ans)
# Original solution
n = int(eval(input()))

lst = [111,222,333,444,555,666,777,888,999]

for i in lst:
    if n <= i:
        print(i)
        break


# Optimized solution
kaisai_lst = [111,222,333,444,555,666,777,888,999]
N = int(eval(input()))
for target_list in kaisai_lst:
    if N <= target_list:
        print(target_list)
        break
# Original solution
import sys
import math
import itertools

def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(eval(input()))
    d,m = divmod(N-1,111)

    print(((d+1)*111))


if __name__ == "__main__":
    main()


# Optimized solution
import sys

def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(eval(input()))
    d =(N-1)//111
    print(((d+1)*111))


if __name__ == "__main__":
    main()
# Original solution
n=int(eval(input()))
if 100<=n<=111:
    print((111))
elif 112<=n<=222:
    print((222))
elif 223<=n<=333:
    print((333))
elif 334<=n<=444:
    print((444))
elif 445<=n<=555:
    print((555))
elif 556<=n<=666:
    print((666))
elif 667<=n<=777:
    print((777))
elif 778<=n<=888:
    print((888))
elif 889<=n<=999:
    print((999))

# Optimized solution
n=int(eval(input()))
L=[111,222,333,444,555,666,777,888,999]
for i in L:
    if n<=i:
        print(i)
        break
# Original solution
print((-(-int(eval(input()))//111)*111))

# Optimized solution
print((-int(eval(input()))//111*-111))
# Original solution
import itertools
import math
import fractions
import functools
n = int(eval(input()))

if 100 <= n and n <= 111:
    print((111))
if 112 <= n and n <= 222:
    print((222))
if 223 <= n and n <= 333:
    print((333))
if 334 <= n and n <= 444:
    print((444))
if 445 <= n and n <= 555:
    print((555))
if 556 <= n and n <= 666:
    print((666))
if 667 <= n and n <= 777:
    print((777))
if 778 <= n and n <= 888:
    print((888))
if 889 <= n and n <= 999:
    print((999))


# Optimized solution
import itertools
import math
import fractions
import functools
n = int(eval(input()))

i = math.ceil(n / 111)
print((i*100+i*10+i))
# Original solution
import itertools
import math
import fractions
import functools
n = int(eval(input()))

i = math.ceil(n / 111)
print((i*100+i*10+i))

# Optimized solution
n = int(eval(input()))

if n % 111 == 0:
    print(n)
    quit()

print(((n//111+1)*111))
# Original solution
import re
import sys

n = int(eval(input()))

for i in range(n, 1000):
    if re.match('^([0-9])\\1+$', str(i)):
        print(i)
        sys.exit(0)

# Optimized solution
n = int(eval(input()))

for i in range(1, 10):
    if n <= i*111:
        print((i*111))
        exit()
# Original solution
N = int(eval(input()))

if N > 888:
    print((999))
elif N > 777:
    print((888))
elif N > 666:
    print((777))
elif N > 555:
    print((666))
elif N > 444:
    print((555))
elif N > 333:
    print((444))
elif N > 222:
    print((333))
elif N > 111:
    print((222))
else:
    print((111))

# Optimized solution
N = int(eval(input()))

ans = -(-N // 111) * 111

print(ans)
# Original solution
print((-(-int(eval(input()))//111)*111))

# Optimized solution
print((0--int(eval(input()))//111*111))
# Original solution
n = int(eval(input()))
while True:
    if len(set(str(n))) == 1:
        print(n)
        break
    n += 1


# Optimized solution
n = int(eval(input()))
print((((n-1)//111+1)*111))
# Original solution
N= int(eval(input()))
A = [111, 222, 333, 444, 555, 666, 777, 888, 999]

for i in A:
    if N==i:
        print(i)
        break
    elif N > i:
        continue
    elif N <= i:
        print(i)
        break
    
        

# Optimized solution
n=int(eval(input()))
for i in range(n,1000):
    if str(i)[0] == str(i)[1] == str(i)[2]:
        print(i)
        exit()
# Original solution
import sys

n = int(eval(input()))

for x in range(n, 1000):
  s = str(x)
  
  if s[0] == s[1] and s[1] == s[2]:
    print(s)
    sys.exit()

# Optimized solution
n=int(eval(input()))
print(((n+110)//111*111))
# Original solution
n = int(eval(input()))
while n%111!=0:
    n += 1
print(n)


# Optimized solution
n = int(eval(input()))
while n % 111:
    n += 1
print(n)
# Original solution
N = int(eval(input()))
num_list = [111*i for i in range(1,10)]
nums = [num_list[i]-N for i in range(len(num_list)) if num_list[i]-N >= 0]
n = min(nums)
print((N+n)) 

# Optimized solution
N = int(eval(input()))
print((((N-1)//111+1)*111))
# Original solution
def ans():
  N = int(eval(input()))
  if(N%111 == 0):
    print(N)
  else:
    print(((N//111+1)*111))
ans()

# Optimized solution
N = int(eval(input()))
if(N%111 == 0):
  print(N)
else:
  print(((N//111+1)*111))
# Original solution
for i in range(int(eval(input())), 1000):
  if(str(i)[0] == str(i)[1] and str(i)[1] == str(i)[2]):
    print(i)
    break

# Optimized solution
n = int(eval(input()))
 
for i in range(n,1000):
 if i % 111 == 0:
  print(i)
  break
# Original solution
# A - Grouping 2
# ある学校に N 人の生徒がいる
# なるべく多く 3人 以上のグループにしたい！
# 3人以上のグループを 最大で x 個 作れるときの x の値を出力する

# 生徒数 N （整数） を入力
N = int(eval(input()))
# print(N)

# N を 3 で割った余りで 計算する

if N % 3 == 0:
    # print('amari0')
    answer = int(N / 3)
elif N % 3 == 1:
    # print('amari1')
    answer = int((N - 1) / 3)
else:
    # print('amari2')
    answer = int((N - 2) / 3)

# 結果の表示
print(answer)


# Optimized solution
# A - Grouping 2
# ある学校に N 人の生徒がいる
# なるべく多く 3人 以上のグループにしたい！
# 3人以上のグループを 最大で x 個 作れるときの x の値を出力する

# 生徒数 N （整数） を入力
N = int(eval(input()))
# print(N)

# # N を 3 で割った余りで 計算する
# if 及び % を使わずに再現
answer = int(N / 3)


# 結果の表示
print(answer)
# Original solution
n = int(eval(input()))
print((n // 3))


# Optimized solution
print((int(eval(input())) // 3))
# Original solution
n = int(eval(input()))
print((n // 3))

# Optimized solution
n = int(eval(input()))
ans = n // 3
print(ans)
# Original solution
#                         author:  kagemeka 
#                         created: 2019-11-06 16:52:04(JST)
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools 
# import statistics

def main():
    n = int(sys.stdin.readline().rstrip())
    ans = n // 3
    print(ans)


if __name__ == "__main__":
    # execute only if run as a script
    main()


# Optimized solution
import sys

n = int(sys.stdin.readline().rstrip())

def main():
    return n // 3

if __name__ == '__main__':
    ans = main()
    print(ans)
# Original solution
# A - Grouping 2
n = int(eval(input()))
print((n // 3))

# Optimized solution
# ABC 089: A – Grouping 2
n = int(eval(input()))
print((n // 3))
# Original solution
print((int(eval(input()))//3))

# Optimized solution
n = int(eval(input()))
print((n//3))
# Original solution
N = int(eval(input()))
print((N//3))

# Optimized solution
print((int(eval(input()))//3))
# Original solution
a = int(eval(input()))
print((a // 3))


# Optimized solution
print((int(eval(input())) // 3))
# Original solution
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
INF = float("inf")
import sys
sys.setrecursionlimit(10000)


def solve(N):
    return N // 3


def main():
    N = int(eval(input()))
    print((solve(N)))


if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def main():
    N = int(eval(input()))
    print((N // 3))

if __name__ == '__main__':
    main()
# Original solution
print((int(eval(input())) // 3))

# Optimized solution
N = int(eval(input()))
print((N // 3))
# Original solution
import math


N = int(eval(input()))
N = math.ceil(N)

print((math.floor(N/3)))

# Optimized solution
print((int(int(eval(input()))/3)))
# Original solution

N = int(eval(input()))

print((N//3))

# Optimized solution
N = eval(input ())
N = int (N)
print((N//3))
# Original solution
# N人の生徒がいる
N = int( eval(input()) )

# 3人以上のグループの数を最大化
# つまり ３人のグループを最大数作る
# 最大数作るグループ数を x とする

x = int( N / 3 )

print( x )

# Optimized solution
N = int( eval(input()))

x = N // 3
 
print(x)
# Original solution

ans = float("inf")


def solve():

    N = int(eval(input()))

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

    print("No")


if __name__ == "__main__":
    solve()


# Optimized solution
N = int(eval(input()))

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

print("No")
# Original solution
n = int(eval(input()))
money = [4*i + 7*j for i in range(n//4+1) for j in range(n//7+1)]
print(('Yes' if n in money else 'No'))


# Optimized solution
n=int(eval(input()))
X=[]
for i in range(0,26):
    for j in range(0,15):
        if i*4+j*7<=100:
            X.append(i*4+j*7)
print(('Yes' if n in X else 'No'))
# Original solution
n = int(eval(input()))
flag = False
for i in range(int(n/4)+1):
    for j in range(int(n/7)+1):
        if i==0 and j==0:
            continue
        if n%((4*i)+(7*j)) == 0:
            flag = True
            break
if flag:
    print("Yes")
else:
    print("No")

# Optimized solution
N = int(eval(input()))
f = False
for i in range(N//4+1):
    for j in range(N//7+1):
        if i*4 + j*7 == N:
            f = True
            break
if f:
    print("Yes")
else:
    print("No")
# Original solution
# 入力
N = int(eval(input()))

# 処理
exist = False           # 条件を満たす買い方が存在する
for i in range(100):    # ケーキを買う個数
  for j in range(100):  # ドーナツを買う個数
    s = i*4 + j*7       # 合計金額
    if s == N:          
      exist = True      # 条件を満たす買い方を見つけた

# 出力
if exist:
  print("Yes")
else:
  print("No")

# Optimized solution
N = int(eval(input()))
ans = "No"
for i in range(N):
  rem = N-4*i
  if rem >= 0 and rem % 7 == 0:
    ans = "Yes"
print(ans)
# Original solution
import sys
n = int(eval(input())) 
for i in range(100):
    for j in range(100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()

print("No")


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

print("No")
# Original solution
import sys
n = int(eval(input())) 
i = 0 
j = 0
while(i < 100):
    j = 0
    while(j < 100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()
        j+= 1
        
    i+= 1

print("No")


# Optimized solution
import sys
n = int(eval(input())) 
for i in range(100):
    for j in range(100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()

print("No")
# Original solution
# Problem:
# Python  Try

import sys
# from collections import defaultdict
# import heapq
# import copy
# from collections import deque
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(totalsum):
    result = "No"
    for j in range(0, 100//4+1, +1):
        for k in range(0, 100//7+1, +1):
            thiscase = j * 4 + k * 7
            if thiscase == totalsum:
                result = "Yes"
    return result


if __name__ == "__main__":
    print("{}".format(solver(II())))


# Optimized solution
# Problem: https://atcoder.jp/contests/abc105/tasks/abc105_b
# Python 2nd Try

import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(TOTALSUM):
    result = "No"
    totalsum4max = TOTALSUM // 4 + 1
    totalsum7max = TOTALSUM // 7 + 1
    for j in range(0,totalsum4max):
        for k in range(0,totalsum7max):
            nowtotal = j * 4 + k * 7
            if nowtotal == TOTALSUM :
                result = "Yes"
    return result


if __name__ == "__main__":
    print("{}".format(solver(II())))
# Original solution
n = int(eval(input()))
a = int(n / 7)
check = False
for i in range(a, -1, -1):
    if (n - 7 * i) % 4 == 0:
        check = True
if check:
    print('Yes')
else:
    print('No')


# Optimized solution
n = int(eval(input()))
a = int(n / 7)
for i in range(a, -1, -1):
    if (n - 7 * i) % 4 == 0:
        print('Yes')
        exit()
print('No')
# Original solution
import sys

cand = set()
for i in range(0, 100+1, 4):
    for j in range(0, 100-i+1, 7):
        cand.add(i + j)

n = int(sys.stdin.readline().rstrip())

def main():
    return 'Yes' if n in cand else 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)

# Optimized solution
import sys

cand = set()
for i in range(0, 20+1, 4):
    for j in range(0, 20-i+1, 7):
        cand.add(i + j)

n = int(sys.stdin.readline().rstrip())

def main():
    return 'Yes' if n in cand or n >= 21 else 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)
# Original solution

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


# Optimized solution
n = int(eval(input()))
for i in range((n+3)//4+1):
    if (n - i * 4 ) % 7 == 0:
        print('Yes')
        break
else:
    print('No')
# Original solution
import math
N = int(eval(input()))

flag = False

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


# Optimized solution
import math
N = int(eval(input()))

flag = False

for i in range(math.ceil(N/7)+1):
    for j in range(math.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')
# Original solution
def actual(N):
    oks = []

    for idx, n in enumerate(list(range(4, 104, 4)), start=1):
        for i in range(idx + 1):
            satisfied_value = n + (3 * i)

            if satisfied_value <= 100:
                oks.append(satisfied_value)

    oks = sorted(set(oks))

    if N in oks:
        return 'Yes'

    return 'No'
  
N = int(eval(input()))
print((actual(N)))

# Optimized solution
def actual(N):
    # 0 <= ケーキの数   <= N/4
    # 0 <= ドーナツの数 <= N/7
    # その範囲で (ケーキの数A, ドーナツの数B) を全探索する
    # N = 4A + 7B を満たす組があれば Yes
    n_max_cakes = N // 4
    n_max_donuts = N // 7

    for n_cakes in range(n_max_cakes + 1):
        for n_donuts in range(n_max_donuts + 1):
            price = (4 * n_cakes) + (7 * n_donuts)

            if price == N:
                return 'Yes'

    return 'No'

N = int(eval(input()))
print((actual(N)))
# Original solution
n = int(eval(input()))
for i in range(100//4):
    for j in range(100//7):
        if n == i * 4 + j * 7:
            print('Yes')
            exit()
print('No')

# Optimized solution
n = int(eval(input()))
for i in range(100 // 4 + 1):
    for j in range(100 // 7 + 1):
        if n == i * 4 + j * 7:
            print('Yes')
            exit()
print('No')
# Original solution
n=int(eval(input()))
for i in range(15):
    if i*7>n:break
    for j in range(26):
        if i*7+j*4>n:break
        if i*7+j*4==n:
            print("Yes")
            exit()
print("No")

# Optimized solution
n=int(eval(input()))
for i in range(15):
    for j in range(26):
        if i*7+j*4==n:
            print("Yes")
            exit()
print("No")
# Original solution
def check(n):
    if n == 0:
        return True
    if 0 > n:
        return False
    return any([check(n - 4), check(n - 7)])


def main():
    if check(int(eval(input()))) is True:
        print('Yes')
    else:
        print('No')


main()


# Optimized solution
def main():
    N = int(eval(input()))
    flg = False
    for n in range(N // 7 + 1):
        if (N - 7 * n) % 4 == 0:
            flg = True
            break
    if flg is True:
        print('Yes')
    else:
        print('No')


main()
# Original solution
import itertools
import sys

"""
1個4ドルのケーキX個と1個7ドルのドーナツY個
合計Nドルとなる買い方があるときはyes、逆はno

1<= N <=100
4 * X + 7 * Y = N
0<= X <= 25, 0<= Y <= 14
"""

N = int(eval(input()))
X = list(range(26))
Y = list(range(15))

for i, j in list(itertools.product(X, Y)):
  if 4 * i + 7 * j == N:
    print('Yes')
    sys.exit()
print('No')

# Optimized solution
import itertools
import sys

N = int(eval(input()))
x = list(range(25 + 1))
y = list(range(14 + 1))
for i, j in itertools.product(x, y):
  if i * 4 + j * 7 == N:
    print('Yes')
    sys.exit()
else:
  print('No')
# Original solution
N=int(eval(input()))
ans=0
if N>3:
    for i in range(N):
        for j in range(N):
            if 4*i+7*j==N:
                ans=ans+1
final_answer=lambda x:'Yes' if ans!=0 else 'No'
print((final_answer(ans)))

# Optimized solution
n=int(eval(input()))

for i in range(25):
    for j in range(14):
        p=4*i+7*j
        if p==n:
            print("Yes")
            exit()
            
print("No")
# Original solution
n=int(eval(input()))
for i in range(30):
  for j in range(30):
    if 4*i+7*j==n:
      print('Yes')
      exit()
      
print('No')

# Optimized solution
n=int(eval(input()))
for i in range(27):
  for j in range(27):
    if 4*i+7*j==n:
      print('Yes')
      exit()
print('No')
# Original solution
N = int(eval(input()))
ans = 'No'
for cake in range(26):
    for donatsu in range(15):
        if 4*cake + 7*donatsu == N:
            ans = 'Yes'
            break
print(ans)

# Optimized solution
N = int(eval(input()))
for i7 in range(20):
    for i4 in range(30):
        if i7 * 7 + i4 * 4 == N:
            print('Yes')
            break
    else:
        continue
    
    break
else:
    print('No')
# Original solution
N = int(eval(input()))
flag = False
for i in range(26):
    for j in range(15):
        if 4 * i + 7 * j == N:
            flag = True

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


# Optimized solution
N = int(eval(input()))
flag = False
for i in range(N // 4 + 1):
    for j in range(N // 7 + 1):
        if 4 * i + 7 * j == N:
            flag = True

if flag:
    print("Yes")
else:
    print("No")
# Original solution
N = int(eval(input()))
result = "No"
for i in range(101):
  for j in range(101):
    total = 4 * i + 7 * j 
    if N == total :
      result = "Yes"
      break
print(result)

# Optimized solution
N = int(eval(input()))
cMax = round(100 / 4)
dMax = round(100 / 7)
result = "No"
for c in range(cMax):
  for d in range(dMax):
    if 4 * c + 7 * d == N:
      result = "Yes"
      break
print(result)
# Original solution
print(('Yes' if [4 * i + 7* j for i in range(101) for j in range(101)].count(int(eval(input()))) else 'No'))


# Optimized solution
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
time = N // 7
bl = False

for x in range(time+1):
    y = N - x * 7
    if y % 4 == 0:
        bl = True; break

print(('Yes' if bl else 'No'))
# Original solution
N = int(eval(input()))
for i in range(101):
    if N - 7 * i < 0:
        break
    if (N - 7 * i) % 4 == 0:
        print('Yes')
        exit()
print('No')

# Optimized solution
if int(eval(input())) in [1, 2, 3, 5, 6, 9, 10, 13, 17]:
    print('No')
else:
    print('Yes')
# Original solution
N = int(eval(input()))

four = [4*i for i in range(26)]
seven = [7*i for i in range(15)]

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

# Optimized solution
N = int(eval(input()))
four = [4*i for i in range(26)]
seven = [7*i for i in range(15)]

exist = False
for f in four:
    for s in seven:
        if f+s == N:
            exist = True
            
if exist:
    print("Yes")
else:
    print("No")
# Original solution
def judge(a):
    global flg
    if a % 4 == 0 or a % 7 == 0:
        flg = 1

N = int(eval(input()))
flg = 0
judge(N)

while N > 7:
    N -= 7
    judge(N)

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


# Optimized solution
N = int(eval(input()))
f = 0

if N % 4 == 0 or N % 7 == 0:
    f = 1
else:
    while N > 4:
        N -= 4
        if N % 7 == 0:
            f = 1
            break

if f == 0:
    print("No")
else:
    print("Yes")
# Original solution
n = int(eval(input()))
string = "No"
for i in range(1, n+1):
        for j in range(1, n+1):
            if n % (4 * i + 7 * j) == 0:
                string = "Yes"
                break
            elif n % (4 * i) == 0:
                string = "Yes"
                break
            elif n % (7 * j) == 0:
                string = "Yes"
                break

print(string)

# Optimized solution
n = int(eval(input()))
string = "No"
for i in range(n+1):
        for j in range(n+1):
            if n == 4*i + 7*j :
                string = "Yes"
                break

print(string)
# Original solution
N = int(eval(input()))

for i in range(4, N + 1, 4):
    d = N % i
    if d == 0:
        print("Yes")
        exit()

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

for i in range(7, N + 1, 7):
    d = N % i
    if d == 0:
        print("Yes")
        exit()

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

print("No")

# Optimized solution
N = int(eval(input()))

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

print("No")
# Original solution
n = int(eval(input()))

can_buy = False
for i in range(101):
    for j in range(101):
        if 4 * i + 7 * j == n:
            can_buy = True

            break

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


# Optimized solution
n = int(eval(input()))

yes_or_no = False
for i in range(15):
    for j in range(26):
        if 7 * i + 4 * j == n:
            yes_or_no = True

            break

print(("Yes" if yes_or_no else "No"))
# Original solution
n = int(eval(input()))

yes_or_no = False
for i in range(15):
    for j in range(26):
        if 7 * i + 4 * j == n:
            yes_or_no = True

            break

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


# Optimized solution
n = int(eval(input()))

count_of_donut = n // 7
result = False
for i in range(count_of_donut + 1):
    rest = n - i * 7
    if rest % 4 == 0:
        result = True

        break

print(("Yes" if result else "No"))
# Original solution
n = int(eval(input()))
count = 0
for i in range(n+1):
  for j in range(n+1):
    if 4*i + 7*j == n:
      count = 1
      break
if count == 1:
  print("Yes")
else:
  print("No")

# Optimized solution
n = int(eval(input()))
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i + 7*j == n:
            print('Yes')
            exit()
print('No')