Harryxun/stf_run huggingface dataset:
S = list(map(int, input().split()))
S.sort()
if S.sort()==[5,5,7]:
  return("YES")
else:
  return("NO")

### FIXED CODE ###

S = list(map(int, input().split()))
S.sort()
if S == [5,5,7]:
  print("YES")
else:
  print("NO")
s = input()
for v in range(6,101):
    ans += s.count(str(v*2019))
print(str(ans))

### FIXED CODE ###

s,w = map(int,input().split())
if s > w:
    print("safe")
else:
    print("unsafe")
s, t = map(input().split())
a, b = map(int, input().split())
u = input()
if s == u:
  print(a - 1, b)
else:
  print(a, b - 1)

### FIXED CODE ###

s, t = map(str, input().split())
a, b = map(int, input().split())
u = input()
if s == u:
  print(a - 1, b)
else:
  print(a, b - 1)
import numpy as np
# N = int(input())
# data = np.zeros((N,3))
# for i in range(N):
#     data[i] = np.array(input().split())

data = np.array([[2,3,5],[2,1,5],[1,2,5],[3,2,5]])

for n in range(10201):
    C_x = n // 101
    C_y = n % 101
    flg = True
    unsetflg = True
    for i,(x,y,h) in enumerate(data):
        if unsetflg
        	if h>0:
            	H = abs(x-C_x)+abs(y-C_y)+h
            	unsetflg = False
        elif h>0:
            if H != abs(x-C_x)+abs(y-C_y)+h:
                flg = False
                break 
    if flg:
        print(C_x,C_y,int(H))
        break
          

### FIXED CODE ###

import numpy as np
N = int(input())
data = np.zeros((N,3))
for i in range(N):
    data[i] = np.array(input().split())

# data = np.array([[2,3,0],[2,1,0],[1,2,0],[3,2,5]])

if len(np.where(data[:,2]!=0)[0]) == 1:
    C_x, C_y, H = map(int,data[np.where(data[:,2]!=0)[0][0]])
    print(C_x, C_y, H)
else:
    for n in range(10201):
        C_x = n // 101
        C_y = n % 101
        correctflg = True
        unsetflg = True
        for x,y,h in data:
            if unsetflg:
                if h >= 1:
                    H = abs(x-C_x)+abs(y-C_y)+h
                    unsetflg = False
            else:
                if h >= 1 and H != abs(x-C_x)+abs(y-C_y)+h:
                    correctflg = False
                    break 
        if correctflg:
            print(C_x,C_y,int(H))
            break
# import numpy as np

# while True:
# A, B = np.random.randint(100) * 2 + 1, np.random.randint(100) * 2 + 1
# if A < B:
#     A, B = B, A
# ori_a, ori_b = A, B
# while True:
#     print(A, B)
#     mid = abs(A - B)
#     A, B = mid, B
#     if A < B:
#         A, B = B, A
#     # print(A, B)
#     if B == 1:
#         print("clear")
#         break
#     elif B == 0:
#         print(ori_a, ori_b, "wrong")
#         break


def eratos(n):
    if n <= 1:
        return []
    used = [False] * n
    used[0] = used[1] = True
    primes = []
    for i in range(n):
        if used[i] is False:
            primes.append(i)
            for j in range(i * 2, n, i):
                used[j] = True
    return primes


N, K = map(int, input().split())
A = list(map(int, input().split()))
max_a = max(A)
primes = eratos(K + 1)

defactors = []
x = A[0]
for prime in primes:
    if x == 1:
        continue
    while x % prime == 0:
        defactors.append(prime)
        x //= prime
cand = list(set(defactors))

if K > max_a:
    print('IMPOSSIBLE')
else:
    for c in cand:
        next_a = []
        for i in range(len(A)):
            if (A[i] % c != 0):
                next_a.append(A[i])
        A = next_a
    # print(list(filter(lambda x: x != 0, A)))
    if len(list(filter(lambda x: x != 0, A))):
        print("POSSIBLE")
    else:
        print('IMPOSSIBLE')


### FIXED CODE ###


from fractions import gcd


N, K = map(int, raw_input().split())
A = sorted(list(map(int, raw_input().split())))


if K > A[-1]:
    print('IMPOSSIBLE')
else:
    flag = True
    tmp = reduce(gcd, A)
    if tmp != 1:
        flag = False
    for a in A:
        if a == K or (K - a) % tmp == 0:
            flag = True
            break
    if flag:
        print("POSSIBLE")
    else:
        print('IMPOSSIBLE')
count = 0
nums = list(range(a, b))
for i in nums:
    if i % c == 0:
        count + 1
print(count)

### FIXED CODE ###

(a, b, c) = (int(i) for i in input().split())
count = 0
for i in range(a, (b + 1)):
    if c % i == 0:
        count = count + 1
print(count)
T = []
for i in range(5):
    T.append(input())
tmp = []
for i in range(5):
    tmp.append(int(T[i][-1]))
ans = []
for i in range(5):
    if 0 < tmp[i] and tmp[i] <= 5:
        ans.append(i)

lastidx = tmp.index(min([tmp[x] for x in ans]))

sum_ = 0
for i in range(5):
    if tmp[i] == 0:
        sum_ += int(T[i])
    else:
        sum_ += (int(T[i]) + 10 - tmp[i])
print(sum_ - 10 + tmp[lastidx])

### FIXED CODE ###

T = []
for i in range(5):
    T.append(input())
tmp = []
for i in range(5):
    tmp.append(int(T[i][-1]))
T2 = []
for i in range(5):
    if tmp[i] != 0:
        T2.append(int(T[i]) + 10 - tmp[i])
    else:
        T2.append(int(T[i]))
ans = []
for i in range(5):
    if tmp[i] != 0:
        ans.append(sum(T2) - 10 + tmp[i])
    else:
        ans.append(sum(T2))
    
    
    
    

print(min(ans))
import sys
n = int(input())
if n%105==0 or n%104==0 or n%103==0 or n%102==0 or n%101==0 or n%100==0:
	print('1')
    sys.exit()

ans = n%615
if ans < 100:
  ans+=615
for i in range(7):
   for j in range(7):
       for k in range(7):
           for l in range(7):
              for m in range(7):
                   for n in range(7):
                       tmp = 100*i + 101*j + 102*k + 103*l + 104*m + 105*n
                       if ans == tmp:
                            print('1')
                            sys.exit()
                        elif ans < tmp:break
print('0')


### FIXED CODE ###

x=int(input())
n=x//100
if x<100:
    print('0')
else:
    if 100*n<=x and 105*n>=x:
        print('1')
    else:
        print('0')
s=input()
t=input()
n=len(s)
m=len(t)
dp=[[0 for j in range(m+2)] for i in range(n+2)]
for i in range(1,n+1):
	for j in range(1,m+1):
		if s[i-1]==t[j-1]:
			dp[i][j]=dp[i-1][j-1]+1
		else:
			dp[i][j]=max(dp[i-1][j],dp[i][j-1])
i=n
j=m
st=""
while i>0 and j>0:
	while dp[i-1][j]==dp[i][j]:
		i-=1
	while dp[i][j-1]==dp[i][j]:
		j=j-1
	j-=1
	st+=s[i-1]
	i-=1
print(st[::-1])
	

### FIXED CODE ###

s=input()
t=input()
n=len(s)
m=len(t)
dp=[[0 for j in range(m+1)] for i in range(n+1)]
for i in range(1,n+1):
	for j in range(1,m+1):
		if s[i-1]==t[j-1]:
			dp[i][j]=dp[i-1][j-1]+1
		else:
			dp[i][j]=max(dp[i-1][j],dp[i][j-1])
i=n
j=m
st=""
while dp[i][j]:
	while dp[i-1][j]==dp[i][j]:
		i-=1
	while dp[i][j-1]==dp[i][j]:
		j=j-1
	j-=1
	st+=s[i-1]
	i-=1
print(st[::-1])
from string import ascii_lowercase


def main():
    word = input()
    if word == "zyxwvutsrqponmlkjihgfedcba":
        print(-1)
    elif len(word) < 26:
        count = {}
        for a in ascii_lowercase:
            count[a] = 0
        for w in word:
            count[w] += 1
        count = count.items()
        add = ""
        for i in range(26):
            if count[i][1] == 0:
                add = count[i][0]
                break
        print(word + add)
    else:
        stop = ascii_lowercase[::-1]
        final_permutation_index = 25
        for i in range(-2, -27, -1):
            if word[i:] not in stop:
                final_permutation_index = 26 + i
                break
        if final_permutation_index != 25:
            print(word[:final_permutation_index] + word[-1])
        else:
            word = list(word)
            if word[-2] == "z":
                word[-1], word[-3] = word[-3], word[-1]
            else:
                word[-1], word[-2] = word[-2], word[-1]
            print("".join(word))



if __name__ == '__main__':
    main()



### FIXED CODE ###

from string import ascii_lowercase


def main():
    word = input()
    if len(word) < 26:
        count = {}
        for a in ascii_lowercase:
            count[a] = 0
        for w in word:
            count[w] += 1
        count_l = list(count.items())
        count_l.sort(key=lambda x: x[0])
        add = ""
        for i in range(26):
            if count_l[i][1] == 0:
                add = count_l[i][0]
                break
        print(word + add)
    elif word == ascii_lowercase[::-1]:
        print(-1)
    else:
        is_printed = False
        while len(word) > 0 and not is_printed:
            for c in ascii_lowercase[ascii_lowercase.index(word[-1]) + 1:]:
                if c not in word[:-1]:
                    print(word[:-1] + c)
                    is_printed = True
                    break
            else:
                word = word[:-1]


if __name__ == '__main__':
    main()
S = int(input())
mod = 10**9+7

ans = 0

x = [0]*(S+1)
x[3] = 1
x[4] = 1
x[5] = 1
for i in range(6, S+1):
    x[i] += 1
    for j in range(3, i-2):
        x[i] += x[j]
        x[i] %= mod

print(x[S])

### FIXED CODE ###

S = int(input())
mod = 10**9+7

ans = 0

x = [0]*(2020)
x[3] = 1
x[4] = 1
x[5] = 1
for i in range(6, S+1):
    x[i] += 1
    for j in range(3, i-2):
        x[i] += x[j]
        x[i] %= mod

print(x[S])
# -*- coding:utf-8 -*-
import sys
sys.setrecursionlimit(1000000)

def dfs(x, y, sym):
	tile[x][y] = '.'
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym:
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			if not tile[i][j] == '.':
				if tile[i][j] == '@':
					dfs(i, j, '@')
					res += 1
				elif tile[i][j] == '#':
					dfs(i, j, '#')
					res += 1
				elif tile[i][j] == '*':
					dfs(i, j, '*')
					res += 1
	return res
	
res=0	
counter=0
N=-1
M=-1
DX = [-1, 0, 1, 0]
DY = [0, -1, 0, 1]
while True:
	counter+=1
	line = input()
	if ' ' in line:
		nums = line.split(' ')
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(N)]for j in range(M)]
	else:
		tile[counter-2] = list(line)
	if (counter-1)==M and M!=0:
		res = solve()
		counter = 0
		print(res)
	if N==0 and M==0:
		break

### FIXED CODE ###

# -*- coding:utf-8 -*-
import sys
def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym):
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			sym = tile[i][j]
			if tile[i][j] != ".":
				if tile[i][j] is sym:
					dfs(i, j, sym)
					res += 1
	print(res)

counter=0
DX = [-1,0,1,0]
DY = [0,-1,0,1]
sys.setrecursionlimit(10**7)
while True:
	line = input()
	if " " in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(M)] for j in range(N)]
	else:
		tile[counter-1] = list(line)
	if N is 0 and M is 0:
		break
	counter += 1
	if counter-1 is N:
		solve()
		counter = 0
n, k = map(int,input().split())
a = list(map(int, input().split()))
t = [1]
x = [0]*n
x[0] = 1
y = 0
z = 0
d = 0
for i in range(k):
    t.append(a[t[i]-1])
    if x[a[t[i]-1]-1] != 0:
        y = x[a[t[i]-1]-1]
        z = i+2
        b = [a[t[i]-1]]
        break
    else:
        x[a[t[i]-1]-1] += i+2

d = z-y

if d != 0:
    r = (k - y) % d
else:
    r = k - y

for i in range(r+1):
    b.append(a[b[i]-1])

print(b[r+1])


### FIXED CODE ###

n, k = map(int,input().split())
a = list(map(int, input().split()))
t = [1]
x = [0]*n
x[0] = 1
y = 1
z = 0
d = 0
flag = False
for i in range(k):
    t.append(a[t[i]-1])
    if x[a[t[i]-1]-1] != 0:
        y = x[a[t[i]-1]-1]
        z = i+2
        b = [a[t[i]-1]]
        break
    else:
        x[a[t[i]-1]-1] += i+2
        z = i+2
        b = [a[t[i]-1]]
    if i == k - 1:
        flag = True

if flag:
    print(a[t[k-1]-1])
    exit()

d = z-y


if d != 0:
    r = (k - y) % d
else:
    r = k - y

for i in range(r+1):
    b.append(a[b[i]-1])

print(b[r+1])
import sys


def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
    if x1 == x2 or x3 == x4:
        return x1 == x2 and x3 == x4
    elif y1 == y2:
        return y3 == y4
    else:
        return (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3)



#input_file = open(sys.argv[1], "r")

#lines = input_file.readlines()
lines = sys.stdin.readlines()
lines.pop(0)

for line in lines:
    x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, line.split(' ')))
    if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
        print "YES"
    else:
        print "NO"

### FIXED CODE ###


import sys


def parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
    if x2 - x1 == 0.0 or x4 - x3 == 0.0:
        return x2 - x1 == 0.0 and x4 - x3 == 0.0
    else:
        return ((y2 - y1) / (x2 - x1)) == ((y4 - y3) / (x4 - x3))


#lines = sys.stdin.readlines()
#lines.pop(0)

for i in range(input()):
    x1, y1, x2, y2, x3, y3, x4, y4 = tuple(map(float, raw_input().split(' ')))
    if parallelism(x1, y1, x2, y2, x3, y3, x4, y4):
        print "YES"
    else:
        print "NO"
n=int(input())
m=list(map(int,input().split()))
ans=[]
for i in range(n):
  for j in range(i,-1,-1):
    if not m[j]==j:
      continue
    #m[j]==j
    ans.append(j)
    m=m[:j]+m[j+1:]
if not len(m)==0:
  print(-1)
else:
  for i in range(n):
    print(ans[n-1-i])
    

### FIXED CODE ###

n=int(input())
m=list(map(int,input().split()))
ans=[]
for i in range(n):
  for j in range(n-1-i,-1,-1):
    if not m[j]==j+1:
      continue
    #m[j]==j
    ans.append(j+1)
    m=m[:j]+m[j+1:]
    break
if not len(m)==0:
  print(-1)
else:
  for i in range(n):
    print(ans[n-1-i])
c = []
for i in range(3):
    c.append(list(map(int,input().split())))
a = [0,0,0]
b = [0,0,0]
for i in range(3):
    b[i] = c[i][0]-0
for i in range(3):
    a[i] = c[0][i]-b[0]
for i in range(3):
    for j in range(3):
        if a[j]+b[i] != c[i][j]:
            print("No")
            exit()
print("Yes")

### FIXED CODE ###

from collections import Counter
 
S=input()
T=input()
 
S=list(Counter(S).values())
T=list(Counter(T).values())
 
S.sort()
T.sort()
 
if S==T:
  print('Yes')
else:
    print('No')
n,h=map(int,input().split())
a=[0]*n
b=[0]*n
for i in range(n)
a[i],b[i]=map(int,input().split()) 
x=max((a))
y=[i for i in b if i>A]
y.sort(reverse=True)
count=0
for i in range(len(y)):
    if h>0:
        count+=1
        h-=y[i]
    else:
        break
 if h>0:
     count +=int(h//x)+1
print(count)

### FIXED CODE ###

N, H = map(int, input().split())
a = [0] * N
b = [0] * N
for i in range(N):
    a[i], b[i] = map(int, input().split())

A = int(max(a))
B = [i for i in b if i > A]

B.sort(reverse=True)

Sum = 0

for i in range(len(B)):
    H -= B[i]
    Sum += 1
    if H <= 0:
        break

if H > 0:
    Sum += int((H-1)//A)+1


print(Sum)
import math

N, K = map(int, input().split())
A = list(map(int, input().split()))

d = math.floor(math.log2(K)) + 1
m = [0]*d

for a in A:
	for i in range(d):
		if a == 0:
			break
		else:
			m[i] += a & 1
			a = a >> 1

m = list(map(lambda x:N-2*x, m))

a = sum(A)
for i in range(len(m)):
	if m[i] > 0:
		a += int(math.pow(2, i)*m[i])


print(a)


### FIXED CODE ###

import operator

N, K = map(int, input().split())
A = list(map(int, input().split()))

k = [((K+1)&(1<<i))>>i for i in range(40)]

m = [0]*40
for i in range(40):
	c = 0
	for a in A:
		c += (a&(1<<i))>>i
	
	if N < 2*c:
		m[i] = 0
	else:
		m[i] = 1

f = 0
b = [1<<i for i in range(40)]
for i in range(40):
	if k[i]==1:
		x = sum(map(operator.mul, m[:i]+[0]+k[i+1:], b))
		f = max(f, sum([x^a for a in A]))

print(f)
N = int(input())
if N % 10 == 0:
    print(10)
else:
    s = 0
    for i in str(N):
        s += int(i)
	print(s)

### FIXED CODE ###

N = int(input())
if N % 10 == 0:
    print(10)
else:
    s = 0
    for i in str(N):
        s += int(i)
    print(s)
s = input()
k = int(input())
l = len(s)
s = s * 3
dp = [0,0]
check = []
for i in range(3*l-1):
  if s[i+1] != s[i]:
    dp.append(dp[-1])
  else:
    dp.append(dp[-2]+1)
  if (i+2) % l == 0:
    check.append(dp[-1])
if k % 2 == 0:
  ans = check[1] + (k-2) // 2 * (check[2]-check[0])
else:
  ans = check[0] + (k-1) // 2 * (check[2]-check[0])
print(ans)

### FIXED CODE ###

s = input()
k = int(input())
l = len(s)
s = s * 3
dp = [0,0]
check = []
for i in range(3*l-1):
  if s[i+1] != s[i]:
    dp.append(dp[-1])
  else:
    dp.append(dp[-2]+1)
  if (i+2) % l == 0:
    check.append(dp[-1])
if l == 1:
  ans =  k // 2
elif k % 2 == 0:
  ans = check[1] + (k-2) // 2 * (check[2]-check[0])
else:
  ans = check[0] + (k-1) // 2 * (check[2]-check[0])
print(ans)
import sys
lines = sys.stdin.readlines()
line1 = lines.pop(0).split(' ')
#print(line1)
N = int(line1[0])
M = int(line1[1])

#print(N)
#print(M)

str = [0] * N
ans = []
flg = 0
for i in range(M):
  line = lines.pop(0).split(' ')
#  print(line)
  s = int(line[0])
  c = int(line[1])
#  print(s)
#  print(c)
  str[s-1] = c
  print('str = ')
  print(str)
  one = int(str[0])
  if N == 3:
    ret = one*100 + int(str[1])*10 + int(str[2])
    if int(str[1])>0 or int(str[2])>0:
      flg = 1
  elif N == 2:
    ret = one*10 + int(str[1])
    if int(str[1]) > 0:
      flg = 1
  else:
    if one > 0:
      ret = one
  ans.append(ret)

print(ans)
div = 1
if N == 3:
  div = 100
elif N == 2:
  div = 10

for obj in ans[:]:
  if (obj / (10**(N-1))) < 1:
    ans.remove(obj)
  elif flg == 1:
    print('リムーブ候補')
    print(obj)
    print(div)
    a = obj % div
    print(a)
    if a == 0:
      print('リムーブ')

if not ans:
  print('-1')
else:
  print(ans)
  print(min(ans))


### FIXED CODE ###

import sys
import math
lines = sys.stdin.readlines()
line1 = lines.pop(0).split(' ')
#print(line1)
N = int(line1[0])
M = int(line1[1])
#print(N)
#print(M)

#初期化
str = [10] * N
#print(str)

for i in range(M):
  line = lines.pop(0).split(' ')
#  print(line)
  s = int(line[0])
  c = int(line[1])
#  print(s)
#  print(c)
#  print(str[s-1])
#  if str[s-1] > c:
  if str[s-1] == 10:
    str[s-1] = c
  elif(str[s-1] == c):
    #同じ値の場合は何もしない
    pass
  else:
    #既に何かしらの異なる値が入っている場合はエラー
    print('-1')
    sys.exit()

#print(str)
#str = [0 if i == 10 else i for i in str]
#print(str)
if N == 3:
  if str[0] == 10 and str[1] == 10:
    str[0] = 1
    str[1] = 0
  elif str[0] == 10 and str[1] != 10:
    str[0] = 1
  elif str[0] != 10 and str[1] == 10:
    str[1] = 0

  str[2] = 0 if str[2] == 10 else str[2]

  ret = (int(str[0])*100 + int(str[1])*10 + int(str[2])) if int(str[0]) > 0 else -1
elif N ==2:
  str[0] = 1 if str[0] == 10 else str[0]
  str[1] = 0 if str[1] == 10 else str[1]
  ret = (int(str[0])*10 + int(str[1])) if int(str[0]) > 0 else -1
elif N ==1:
  str[0] = 0 if str[0] == 10 else str[0]
  ret = int(str[0])

print(ret)
def resolve():
    N, K = map(int, input().rstrip().split())
    R, S, P = map(int, input().rstrip().split())
    T = list(input().rstrip())

    score = {"r":  P, "s": R, "p": S}

    ans = 0
    for i in range(K):
        ans += score[T[i]]

    for i in range(K, N):
        if T[i-K] == T[i]:
            T[i] = ""
            continue
        ans += score[T[i]]

    print(s)

if __name__ == "__main__":
    resolve()

### FIXED CODE ###

def resolve():
    N, K = map(int, input().split())
    R, S, P = map(int, input().split())
    T = list(input())

    score = {'r':  P, 's': R, 'p': S}

    ans = 0
    for i in range(K):
        ans += score[T[i]]

    for i in range(K, N):
        if T[i-K] == T[i]:
            T[i] = ' '
            continue
        ans += score[T[i]]

    print(ans)

if __name__ == "__main__":
    resolve()
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
  a[i]=(1+a[i])/2
x=[0]*(n+k-1)
for i in range(n):
  for j in range(i,i+k):
    x[j]+=a[i]
print('{:.10f}'.format(max(x)))

### FIXED CODE ###

a,b=input().split()
x,y=map(int,input().split())
c=input()
if a==c:
  x=x-1
else:
  y=y-1
print(x,y)
def repaint(h, w ,s):
    for i in (1, h+1):
        for p in (1, w+1):
            if s[i][p] == '#':
                if (s[i-1][p] != '#') and (s[i][p+1] != '#') and (s[i+1][p] != '#') and (s[i][p-1] != '#'):
                    return 'No'
    return 'Yes'
H, W = map(int, input().split())
S = [['.']*(w+2)]+[list('.'+input()+'.') for i in range(h)]+[['.']*(w+2)]
print(repaint(H, W, S))

### FIXED CODE ###

import numpy as np
def repaint(h,w,s):
    for i in range(1,h+1):
        for p in range(1,w+1):
            if s[i][p] == '#':
                if (s[i-1][p] != '#') and (s[i][p-1] != '#') and (s[i+1][p] != '#') and (s[i][p+1] != '#'):
                    return 'No'
    return 'Yes'
H, W = map(int, input().split())
S = np.array([['0']*(W+2)] + [list('0' + input() + '0') for i in range(H)] +[['0']*(W+2)])
print(repaint(H,W,S))
N = int(input())
for i in range(1,10):
    for j in range(1,10):
        if i*j == N:
            print("Yes")
            sys.exit()
print("No")

### FIXED CODE ###

import sys
N = int(input())
for i in range(1,10):
    for j in range(1,10):
        if i*j == N:
            print("Yes")
            sys.exit()
print("No")
N, M = map(int, input().split())
a_list = list(map(int, input().split()))

items = {
    1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6
}
dp = [0] * (N + 1)

b_list = []
for a in a_list:
    need = items[a]
    if need <= N:
        dp[need] = a
        b_list.append(a)

M = len(b_list)
b_list.sort()
for i in range(N + 1):
    for b in b_list:
        if i - items[b] >= 0:
            if dp[i - items[b]] != 0:
                cnt = 0
                num = dp[i - items[b]]
                while num > 1:
                    cnt += 1
                    num /= 10
                tmp = max(b * (10 ** cnt) + dp[i - items[b]], dp[i - items[b]] * 10 + b)
                dp[i] = max(tmp, dp[i])
print(dp[N])


### FIXED CODE ###

N, M = map(int, input().split())
a_list = list(map(int, input().split()))

items = {
    1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6
}

dp = [-float("inf")] * (N + 1)
b_list = []
for a in a_list:
    need = items[a]
    if need <= N:
        dp[need] = 1
        b_list.append(a)

M = len(b_list)
dp[0] = 0
for i in range(N + 1):
    for b in b_list:
        if i - items[b] >= 0:
            if dp[i - items[b]] != -float("inf"):
                dp[i] = max(dp[i], dp[i - items[b]] + 1)

b_list.sort(reverse=True)
ans = ""

for i in range(dp[N]):
    for b in b_list:
        if dp[N - items[b]] == dp[N] - 1:
            ans += str(b)
            N -= items[b]
            break
print(ans)
n=int(input())
dat = list(map(int, input().split()))
dan = []
for e in dat:
    e = str(bin(e))
    e=e[2:]
       
for e in dat:
      j = -1
     while j > -len(e):
           if e[j]=='1':
                dan.append(-j-1)
                break
            else:
                j = j -1

         
           




### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
N, K input().split()
print(K * (K - 1) ** (N - 1))

### FIXED CODE ###

N, K = map(int, input().split())
print(K * (K - 1) ** (N - 1))
n, k = map(int, input().split())
h = list(map(int, input().split()))
for i in range(k):
    h.remove(max(h))
print(sum(h))

### FIXED CODE ###

n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort()
h.reverse()
if k >= n:
    print(0)
else:
    del h[:k]
    print(sum(h))
ans=chk=0
d=[]
for i in range(5):
    x=int(input())
    if x%10:
        d.append((x%10,x))
    else:
        ans+=x
d.sort(reverse=True)
for i in d:
    ans+=((i[1]+10)//10)*10
ans-=10-d[-1][1]%10

print(ans)


### FIXED CODE ###

ans=chk=0
d=[]
for i in range(5):
    x=int(input())
    if x%10:
        d.append((x%10,x))
    else:
        ans+=x
d.sort(reverse=True)
for i in d:
    ans+=((i[1]+10)//10)*10
if len(d): ans-=10-d[-1][1]%10

print(ans)
import sys

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

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

### FIXED CODE ###

import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a):
    s = 0
    for b in str(a):
        s += int(b)
    if a%s==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()