Harryxun/stf_run huggingface dataset:
import sys
from collections import Counter
 
def main():
    input = sys.stdin.readline
    
    n = int(input())
    m = [int(i) for i in input().split()]
    
    #偶数列 奇数列
    even = [m[i] for i, _ in enumerate(m) if i % 2 == 0]
    odd = [m[i] for i, _ in enumerate(m) if i % 2 == 1]
    
    #頻値を取り出す
    even_c = Counter(even).most_common()
    odd_c = Counter(odd).most_common()
    
    ans = -1
    
    #print(even_c)
    #print(odd_c)
    
    #最頻値の比較
    if even_c[0][0] != odd_c[0][0]:
        ans = len(m) - (even_c[0][1] + odd_c[0][1])
    
    #偶数列と奇数列の最頻値の数字が同じかつ、全て同じ数字じゃない
    elif even_c[0][0] == odd_c[0][0] and len(even_c) > 0:
        ans1 = len(m) - (even_c[0][1] + odd_c[1][1])
        ans2 = len(m) - (even_c[1][1] + odd_c[0][1])
        ans = ans1 if ans1 <= ans2 else ans2
    
    #全て同じ
    else:
        ans = even_c[0][1]
        
    #出力
    print(ans)
    
if __name__ == '__main__':
    main()
   

### FIXED CODE ###

import sys
from collections import Counter
 
def main():
    input = sys.stdin.readline
    
    n = int(input())
    m = [int(i) for i in input().split()]
    
    #偶数列 奇数列
    even = [m[i] for i, _ in enumerate(m) if i % 2 == 0]
    odd = [m[i] for i, _ in enumerate(m) if i % 2 == 1]
    
    #頻値を取り出す
    even_c = Counter(even).most_common()
    odd_c = Counter(odd).most_common()
    
    ans = -1
    
    #print(even_c)
    #print(odd_c)
    #print(len(even_c))
    
    #最頻値の比較
    if even_c[0][0] != odd_c[0][0]:
        ans = len(m) - (even_c[0][1] + odd_c[0][1])
    
    #偶数列と奇数列の最頻値の数字が同じかつ、全て同じ数字じゃない
    elif even_c[0][0] == odd_c[0][0] and len(even_c) > 1:
        ans1 = len(m) - (even_c[0][1] + odd_c[1][1])
        ans2 = len(m) - (even_c[1][1] + odd_c[0][1])
        ans = ans1 if ans1 <= ans2 else ans2
    
    #全て同じ
    else:
        ans = even_c[0][1]
        
    #出力
    print(ans)
    
if __name__ == '__main__':
    main()
data = input()
count_one = 0
for i in length(data):
  num = int(data[i])
  if (num == 1):
    count_one += 1
print(count_one)

### FIXED CODE ###

data = input()
count_one = 0
for i in range(len(data)):
  num = int(data[i])
  if (num == 1):
    count_one += 1
print(count_one)
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)


a,b,c,d = map(int,input().split())
count = 0
i = b//c - a//c 
if(a%c == 0):
  i += 1
j = b//d - a//d
if(a%d == 0):
  j += 1
k = b//lcm(c,d) - a//lcm(c,d)

print(b-a+1-(i+j-k))

### FIXED CODE ###

import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

a,b,c,d = map(int,input().split())
count = 0
i = b//c - a//c 
if(a%c == 0):
  i += 1
j = b//d - a//d
if(a%d == 0):
  j += 1
k = b//lcm(c,d) - a//lcm(c,d)
if(a%lcm(c,d) == 0):
  k += 1

print(b-a+1-(i+j-k))
N=input()
s=[int(input()) for i in range(N)]
print(len(list(set(s))))

### FIXED CODE ###

N=int(input())
s=[int(input()) for i in range(N)]
print(len(set(s)))
n=input()
p = list(map(int,input().split()))
result=[]
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result.append(abs(s1-s2))
resultd = sorted(result)
print(resultd[0])

### FIXED CODE ###

n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)
n=int(input())
A=list(int(input()) for i in range(n))
a=0
for x in range(n):
  a=A[i]
  if a==2:
    print(x)
    break
else:
  print(-1)

### FIXED CODE ###

n=int(input())
A=list(int(input()) for i in range(n))
a=0
for x in range(n):
  a=A[a]-1
  if a==1:
    print(x+1)
    break
else:
  print(-1)
n = str(input().rstrip()+1)
ans = len(n)*9
ans += int(n[0])-1
print(ans)

### FIXED CODE ###

n = str(int(input().rstrip())+1)
ans = (len(n)-1)*9
ans += (int(n[0])-1)
print(ans)
r = 10000001
s = int(r**0.5)
p = [1]*r
p[0] = p[1] = 0
for i in range(2,s):
	if p[i]:
		p[2*i::i] = [0 for x in range(2*i,r,i)]

while 1:
	n = input()
	if n == 0: break
	for i in range(n-(1-n%2),12,-4):
		if p[i] and p[i-2] and p[i-6] and p[i-8]:
			print i
			break

### FIXED CODE ###

ref = [[[10,8],[4,4]],[[10,2],[4,2]]]
r =10000001
p = [1]*r
p[0]= p[1] = 0
for i in range(int(r**0.5)):
	if p[i]:
		p[2*i::i] = [0]*len(p[2*i::i])
		
while 1:
	try:
		n = input()
		if n == 0: break
		n -= 1-n%2
		while any(not p[n-i] for i in [0,2,6,8]):
			n -= ref[p[n-2]][p[n-6]][p[n-8]]
		print n
	except:
		pass
# TPBC201B - *e**** ********e* *e****e* ****e**
n = int(input())
s = list(input())
k = int(input())

for i in range(n):
    if s[i] != s[k]:
        s[i] = '*'
print(''.join(s))

### FIXED CODE ###

# TPBC201B - *e**** ********e* *e****e* ****e**
n = int(input())
s = list(input())
k = int(input())

for i in range(n):
    if s[i] != s[k - 1]:
        s[i] = "*"
print("".join(s))
from itertools import combinations
from collections import Counter

N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]

X.sort()
diff = []
for i, j in combinations(range(N), 2):
    diff.append((X[i][0] - X[j][0], X[i][1] - X[j][1]))
print(N - Counter(diff).most_common()[0][1])




### FIXED CODE ###

from itertools import combinations
from collections import Counter

N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]

if N == 1:
    print(1)
    quit()

X.sort()
diff = []
for i, j in combinations(range(N), 2):
    diff.append((X[i][0] - X[j][0], X[i][1] - X[j][1]))
print(N - Counter(diff).most_common()[0][1])
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
m = int(input())
list = str(input())
n = len(list)
for i in range(n):
	if alpha.index(list[i]) + m < 26:
		list[i] = alpha[alpha.index(list[i]) + m]
	else:
		list[i] = alpha[alpha.index(list[i]) + m -26] 
print(list)

### FIXED CODE ###

alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
m = int(input())
list = input()
newlist = []
n = len(list)
for i in range(n):
	if int(alpha.find(list[i])) + m < 26:
		newlist.append(alpha[int(alpha.find(list[i])) + m])
	else:
		newlist.append(alpha[int(alpha.find(list[i])) + m -26]) 
moji = ''.join(newlist)
print(moji)
import heapq

N, M = map(int,input().split())
A = list(map(lambda x: int(x) * (-1),input().split()))
heapq.heapify(A)
for i in range(M):
    tmp = heapq.heappop(A)
    tmp *= -1
    tmp //= 2
    tmp *= -1
    print(A)
print(sum(A) * -1)

### FIXED CODE ###

import heapq

N, M = map(int,input().split())
A = list(map(lambda x: int(x) * (-1),input().split()))
heapq.heapify(A)
for i in range(M):
    tmp = heapq.heappop(A)
    tmp *= -1
    tmp //= 2
    tmp *= -1
    heapq.heappush(A,tmp)
print(sum(A) * -1)
n, x =map(int,input().split())
s = list(map(int,input().split()))
s.sort()
a, b = x - s[0], s[-1] - x
visit = [0] * n
while sum(visit) != n:
    visit = [0] * n
    y = gcd(a, b)
    i = 0
    while s[0] + y * i <= s[-1] :
        if s[0] + y * i in s:
            visit[s.index(s[0] + y * i)] = 1
        i += 1
    a,b = min(a, b), y
print(y)


### FIXED CODE ###

from fractions import gcd
n, x =map(int,input().split())
s = list(map(int,input().split()))
y = abs(s[0] - x)
for i in range(1,n):
    y = gcd(y, abs(s[i] - x))
print(y)
K=int(intput(""))
S=input("")
lens=len(s)
if lens<=K:
  print(S)
else:
  S2=S[:K-1]
  print(S2)
  

### FIXED CODE ###

K=int(input(""))
S=input("")
lenS=len(S)
if lenS<=K:
  print(S)
else:
  print(S[:K]+"...")
def judgePrime(n):
  result = True
  for i in xrange(2, n):
    if n % i == 0:
      result = False
      break
  return result

def getPrimeNumFromList(list):
  count = 0
  for i in xrange(len(list)):
    target = 0
    if i == 0:
      target = list[0]
      if judgePrime(target):
        count += 1
    else:

  return count

n = int(raw_input())
list = []
for i in xrange(n):
  list.append(int(raw_input()))
list.sort()
print judgePrime(list[len(list) - 1])
# print getPrimeNumFromList(list)

### FIXED CODE ###

import pdb

n = int(raw_input())
count = 0
for x in xrange(n):
  target = int(raw_input())
  # pdb.set_trace()
  if target == 2:
    count += 1
  elif target < 3 or not target & 1:
    continue
  else:
    if pow(2, target - 1, target) == 1:
      count += 1

print count
n,q=map(int,input().split())
c=[[] for _ in range(n)]
for _ in range(n-1):
  a,b=map(int,input().split())
  a-=1
  b-=1
  c[a].append(b)
  c[b].append(a)
px=[0]*n
for I in range(q):
    p,x=map(int,input().split())
    px[p-1]+=x 
ans=[0]*n
def dfs(g,h=-1):
  ans[g]=ans[h]+px[g]
  for i in c[g]:
    if i==h:
      continue
    dfs(i,g)
dfs(0)
print(*ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
n,q=map(int,input().split())
c=[[] for _ in range(n)]
for _ in range(n-1):
  a,b=map(int,input().split())
  a,b=a-1,b-1
  c[a].append(b)
  c[b].append(a)
px=[0]*n
for I in range(q):
    p,x=map(int,input().split())
    px[p-1]+=x 
ans=[0]*n
def dfs(g,h=-1):
  ans[g]=ans[h]+px[g]
  for i in c[g]:
    if i==h:continue
    dfs(i,g)
dfs(0)
print(*ans)
a,b,c=map(int,input().split())
if a**0.5+b**0.5<c**0.5
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a,b,c=map(int,input().split())
if c-a-b<0:
  print('No')
elif (c-a-b)**2>4*a*b:
  print('Yes')
else:
  print('No')
num1 = 2
num2 = 3
chk = 0
N,K =map(int,input().split())
if K > (N-1)*(N-2)//2:
	print(-1)
else:
	for i in range(2,N+1):
		print("1"+" "+str(i))
	left = (N-1)*(N-2)//2 - K
	for i in range(left):
			if N >= num2 :
				if chk == 1:
					num2 += 1
					chk = 0
				print(str(num1) + " " + str(num2))
				num2 += 1
			else:
				num1 +=1
				num2 = num1+1
				print(str(num1) + " " + str(num2))
				chk = 1

### FIXED CODE ###

from collections import Counter
from operator import itemgetter
import math
N = int(input())
work_list = [[int(i) for i in input().split()] for i in range(N)]
new_worklist=sorted(work_list, key=itemgetter(1))
now_time = 0
for i in range (N):
	now_time += new_worklist[i][0]
	if now_time > new_worklist[i][1]:
		print("No")
		break
	if i == N-1:
		print("Yes")
K = int(input())
N = int(input())

A = []

for i in range(N):
    A.append(int(input()))
    
max = A[0]
memo = 0

for i in range(N-1):
    if max < A[i+1]-A[i]:
        max = A[i+1]-A[i]

if max < K-A[N-1]+A[0]:
    max = K-A[N-1]+A[0]
    
print(K-max)
    


### FIXED CODE ###

K,N = map(int,input().split())
A = list(map(int,input().split()))
    
max = K-A[-1]+A[0]
 
for i in range(N-1):
    if max < A[i+1]-A[i]:
        max = A[i+1]-A[i]
    
print(K-max)
ref = ["","',.!?","abcABC","defDEF","ghiGHI","jklJKL","mnoMNO","pqrsPQRS","tuvTUV","wxyzWXYZ"]
def inp(s[0],l):
    n = int(s[0])
    p = (l-1)%len(ref[n])
    return ref[n][p]

while 1:
    try:
        ans = ""
        s = ""
        for push in raw_input():
            l = len(s)
            if push == "0":
                if l > 0:
                    ans += inp(s[0],l)
                    s = ""
                else:
                    ans += " "
            elif l == 0 or s[-1] == push:
                s += push
            else:
                ans += inp(s[0],l)
                s = push
        if l > 0:
            ans += " "*l if s[0] == 0 else ans += inp(s[0],l):
        print ans
    except:
        break

### FIXED CODE ###

ref = ["",
       "',.!?",
       "abcABC",
       "defDEF",
       "ghiGHI",
       "jklJKL",
       "mnoMNO",
       "pqrsPQRS",
       "tuvTUV",
       "wxyzWXYZ"]

def inp(s):
    n = int(s[0])
    p = (len(s)-1)%len(ref[n])
    return ref[n][p]

while 1:
    try:
        pushes = raw_input()
    except:
        break
    ans = ""
    s = ""
    for push in pushes:
        l = len(s)
        if push == "0":
            if l > 0: ans += inp(s)
            else: ans += " "
            s = ""
        elif l == 0 or s[-1] == push:
            s += push
        else:
            ans += inp(s)
            s = push
    if l > 0:
        ans += " "*l if s[0] == "0" else inp(s)
    print ans
H, W, A, B = map(int, input().split())

if A == 0 or B == 0:
    pass
else H % B != 0 or W % A != 0 or H // B * A != W // A * B:
    print('No')
    exit()

answer = [[-1] * W for _ in range(H)]
a = 0
b = 0
for i in range(H):    
    answer[i] = [0 if a <= j <= a + A -1 else 1 for j in range(W)]
    a += A
for i in range(H):
    print(*answer[i])

### FIXED CODE ###

H, W, A, B = map(int, input().split())


for i in range(B):
    answer = ['0' if j < A else '1' for j in range(W)]
    print(''.join(answer))
for i in range(H-B):
    answer = ['1' if j < A else '0' for j in range(W)]
    print(''.join(answer))
H,N = map(int,input().split())
A = []
B = []
for i in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
x = max(A)
dp = [10**9 for i in range(H+x+1)]
dp[0] = 0
for i in range(N):
    a = A[i]
    b = B[i]
    for j in range(H+x+1):
        if j < a:
            continue
        dp[j] = min(dp[j-a]+b,dp[j])
ans = 10**9
for i in range(H,H+X+1):
    ans = min(ans,dp[i])
print(ans)

### FIXED CODE ###

H,N = map(int,input().split())
A = []
B = []
for i in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
x = max(A)
dp = [10**9 for i in range(H+x+1)]
dp[0] = 0
for i in range(N):
    a = A[i]
    b = B[i]
    for j in range(H+x+1):
        if j < a:
            continue
        dp[j] = min(dp[j-a]+b,dp[j])
ans = 10**9
for i in range(H,H+x+1):
    ans = min(ans,dp[i])
print(ans)
A = [input() for i in range(6)]
a, b, c, d, e, k = A
B = [a-b, a-c, a-d, a-e,b-c,b-d,b-e,c-d,c-e,d-e]
for i in range(10):
    if abs(B[i]) > k:
        print(":(")
        break
else:
    print("Yay!")

### FIXED CODE ###

A = [input() for i in range(6)]
X = list(map(int, A))
a = X[0]
e = X[4]
k = X[5]
if e-a > k:
    print(":(")
else:
    print("Yay!")
import math

A, B = input().split(" ")
A = int(A)
B = int(B)

print(math.floor(A * B))

### FIXED CODE ###

import math
import decimal

A, B = input().split(" ")
A = decimal.Decimal(A)
B = decimal.Decimal(B)

print(math.floor(A * B))
N, M = list(map(int, input().split()))

for i in range(M-N):
  k = i + N
  if M % k == 0:
    print(int(M/k))
    tmp=1
    break

if tmp==1:
else:
  print(1)

### FIXED CODE ###

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

if N==1:
  print(M)
  tmp=1
else:
  for i in range(int(M**0.8)+1):
    k = i + N
    if M % k == 0:
      print(int(M/k))
      tmp=1
      break

if tmp==0:
  print(1)
X = int(input())
Y = int(input())
Z = int(input())
print(Z, X, Y)

### FIXED CODE ###

X, Y, Z = map(int, input().split())
print(Z, X, Y)
from math import log10
N = input()
n = int(N)
t = n % 10 ** int(log10(n)) + 1
print(max(sum(map(int, N)), sum(map(int, str(n - t)))))


### FIXED CODE ###

N = input()
n = int(N)
t = n % 10 ** (len(N) - 1) + 1
print(max(sum(map(int, N)), sum(map(int, str(n - t)))))
import math
a1, b, c, d = map(int, input().split())
a = a1 - 1
Sa =  a - a//c - a//d + a//(c*d/math.gcd(c, d))
Sb =  b - b//c - b//d + b//(c*d/math.gcd(c, d))
print(int(Sb - Sa))

### FIXED CODE ###

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a


a1, b, c, d = map(int, input().split())
a = a1 - 1
Sa = a - a//c - a//d + a//(c*d//gcd(c, d))
Sb = b - b//c - b//d + b//(c*d//gcd(c, d))
print(int(Sb - Sa))
import fraction
from functools import reduce


def lcm_base(x, y):
    return (x * y) // fraction.gcd(x, y)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)


### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# 文字列入力
'''
S = input()
A, B = input().split()
'''

# 文字列分解（['A', 'B', 'C']）
'''
S = list(input())
'''

# 整数入力
'''
X, Y, Z = map(int, input().split())
X, Y, Z = list(map(int, input().split()))
'''

# リストのユニーク化（順破壊）
'''
L = ['a', 'a', 'b']
L = list(set(L))
'''

# 固定長リスト最速初期化
'''
L = [None] * N
'''

# 二進数でフラグパターンを全種作成
'''
import numpy as np

N = 3
f = []

for i in range(0, 2**N):
    string = str(bin(i))[2:]
    f.append(['0'] * (N - len(string)) + list(string))

F = np.array(f)
F = (F == '1')
'''

import fractions
from functools import reduce


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)
ab=input().split()
a=int(ab[0])
b=int(b[0]+b[2]+b[3])

s=a*b
print(int(s/100))

### FIXED CODE ###

ab=input().split()
a=int(ab[0])
b=int(ab[1][0]+ab[1][2]+ab[1][3])
 
s=a*b
print(s//100)
N = int(input())
A = [int(x) for x in input().split()]
mySet = set()
for i in A:
  if i in mySet:
    print('NO')
    exit()
    else:
      mySet.add(i)
print('YES')

### FIXED CODE ###

N = int(input())
A = [int(x) for x in input().split()]
mySet = set()
for i in A:
  if i in mySet:
    print('NO')
    exit()
  else:
      mySet.add(i)
print('YES')
n=int(input())

def change(): #ここに数字からアルファベットを1体1で対応させれば終わり

p=[]
while n>0:
  a=n%26
  p.append(a)
  n=n//26

for i in range(len(p)):
  p[i]=change(p[i])

p.reverse()  

b=''

for i in range(len(p)):
  b += p[i]
  
print(b)

### FIXED CODE ###

n = int(input())
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
b = ''
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = a[X_dumy%n-1]+out
        if a[X_dumy%n-1] == 'z':
          X_dumy -= 26
        X_dumy = X_dumy//n
    return out

z = Base_10_to_n(n, 26)
print(z)
import math

inn = [int(x) for x in input().split()]
aa = []
bb = []
for i in range(inn[0]):
    tmp = [int(x) for x in input().split()]
    aa.append(tmp[0])
    bb.append(tmp[1])

maxaa = max(aa)
ba = [x for x in bb if x > maxaa]
sumba = sum(ba)
lenba = len(ba)
if sumba == inn[1]:
    print(lenba)
    exit()
elif sumba > inn[1]:
    count = lenba
    tot = sumba
    for b in sorted(ba):
        tot -= b
        if tot < inn[1]:
            print(count)
            exit()
        count -= 1
else:
    count = lenba + math.ceil((inn[1]-sumba)/max(aa))
    print(count)


### FIXED CODE ###

indate = input().split('/')
outdate = ['2018'] + indate[1:3]
print('/'.join(outdate))
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 11 14:44:47 2018
ABC046C
@author: maezawa
"""
import math
n = int(input())
ti, ai = list(map(int, input().split()))
vp = ti + ai
tp = ti
ap = ai
for i in range(1,n):
    t, a = list(map(int, input().split()))
    if ti == t and ai == a:
        continue
    ti = t
    ai = a
    nit = tp/ti
    nia = ap/ai
    ni = math.ceil(max(nit, nia))
    vi = ni*(ti+ai)
    #print(ni, vi)
    tp = ni*ti
    ap = ni*ai

print(vi)

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sat Aug 11 14:44:47 2018
ABC046C
@author: maezawa
"""
import math
n = int(input())
tp = 1
ap = 1
for i in range(n):
    ti, ai = list(map(int, input().split()))
    #nit = math.ceil(tp/ti)
    #nia = math.ceil(ap/ai)
    nit = -tp//ti
    nia = -ap//ai
    ni = max(-nit, -nia)
    vi = ni*(ti+ai)
    #print(ni, vi)
    tp = ni*ti
    ap = ni*ai

print(vi)
a = int(input())
b = [int(i) for i in input().split()]
last = 1
if 0 not in b:
  for i in b:
      last*=i
      if last > 10**18:
      	last = -1
        break

else:
  last = 0
    
print(last)

### FIXED CODE ###

input()
b = [int(i) for i in input().split()]

if 0 not in b:
  last = 1
  for i in b:
      last*=i
      if last > 10**18:
        last = -1
        break
    
else:
  last = 0
    
print(last)
k = int(input())

l = []
for i in range(17):
    ten = 10**i
    for j in range(2,11):
        a = ten
        b = j
        n = a*b-1
        s = sum(map(int,str(n)))
        l.append([s,n])
l.sort()

for i in range(k):
    print(l[i][1])


### FIXED CODE ###

k = int(input())

l = []
for i in range(17):
    ten = 10**i
    for j in range(1,1000):
        a = ten
        b = j
        n = a*b-1
        if n == 0:
            continue
        s = sum(map(int,str(n)))
        l.append([n/s,n])
l.sort()
now = 0
count = 0
i = 0
while count < k:
    if l[i][1] > now:
        now = l[i][1]
        count += 1
        print(l[i][1])
    i += 1
import numpy as np
import sys

L, N = map(int, input().split())
X = np.array([int(sys.stdin.readline()) for _ in range(N)])
Y1 = np.concatenate(([X[0]], X[1:] - X[:-1], [L - X[-1]]))

X2 = X[::-1]
Y2 = Y1[::-1]


def func(n):
    return np.concatenate((np.full(n + 1, N - n, dtype=np.int), np.arange(N - n - 2, -1, -2), np.arange(N - n - 1, -1, -2)[::-1]))


if N < 10000:
    ans = 0
    for n in range((N + 1) // 2):
        a = func(n)
        len1 = np.dot(a, Y1)
        len2 = np.dot(a, Y2)
        ans = max(ans, len1, len2)

    print(ans)
else:
    ans = 0
    cn = (N + 1) // 200
    len1 = [0] * cn
    len2 = [0] * cn
    can1 = [0] * cn
    can2 = [0] * cn
    for n in range(0, (N + 1) // 2, 100):
        a = func(n)
        i = n // 100
        len1[i] = np.dot(a, Y1)
        len2[i] = np.dot(a, Y2)
        can1[i] = X[n + (N - n + 100)//2] - 2 * X[n] - (L - X[(N - n - 101)//2])
        can2[i] = X2[n + (N - n + 100) // 2] - 2 * X2[n] - (L - X2[(N - n - 101) // 2])
        ans = max(ans, len1[i], len2[i])

    for n, (len_, can) in enumerate(zip(len1, can1)):
        if len_ + can > ans:
            for j in range(100 * n, 100 * n + 100):
                ans = max(np.dot(func(j), Y1), ans)

    for n, (len_, can) in enumerate(zip(len2, can2)):
        if len_ + can > ans:
            for j in range(100 * n, 100 * n + 100):
                ans = max(np.dot(func(j), Y2), ans)
    print(ans)


### FIXED CODE ###

import numpy as np
import sys

L, N = map(int, input().split())
X = np.array([int(sys.stdin.readline()) for _ in range(N)])
X2 = L - X[::-1]
Y1 = np.concatenate(([X[0]], X[1:] - X[:-1], [L - X[-1]]))
Y2 = Y1[::-1]
Z = np.concatenate((np.arange(N, -1, -2), np.arange(N - 1, -1, -2)[::-1]))


def myfunc(n, x):
    return x[n + (N - n + 1)//2 - 1] - 2 * x[n - 1] - (L - x[N - (N - n + 1)//2])


len1 = np.dot(Z, Y1)
len2 = np.dot(Z, Y2)
x1 = X.tolist()
x2 = X2.tolist()
ans = max(len1, len2)
for n in range(1, (N + 1) // 2):
    len1 += myfunc(n, x1)
    len2 += myfunc(n, x2)
    ans = max(ans, len1, len2)

print(ans)
A,B,K = list(map(int,input().split()))

nums = []

for i in range(1,min(A,B),1):
    if B % i == 0 and A % i == 0:
        nums.append(i)

if nums == []:
    print(1)
else:
    print(nums[K-1])

### FIXED CODE ###

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

nums = []
cnt = 0

for i in range(1,min(A,B)+1,1):    
    if B % i == 0 and A % i == 0:
        nums.append(i)

print(nums[-K])
n = (int, raw_input().split())
n = n.sort()
print n

### FIXED CODE ###

a,b,c = map(int, raw_input().split())
n = [a,b,c]
n.sort()
for i in n:
    print i,
import numpy as np
import sys
N = int(input())

Abs = int(np.sqrt(N))
if Abs ** 2 == N:
    print((Abs - 1) * 2)
    sys.exit(1)
else:
    min = N + 1
    min_i = 0
    for i in range(1, Abs + 1):
        tmp = N // i
        if tmp * i == N:
            if min > tmp:
                min = tmp
                min_i = i

print(min + min_i - 2)

### FIXED CODE ###

import numpy as np
N = int(input())
Abs = int(np.sqrt(N))
if Abs ** 2 == N:
    print(Abs + Abs - 2)
else:
    min = N + 1
    min_i = 1
    for i in range(1, Abs + 1):
        tmp = N // i
        if tmp * i == N:
            if min > tmp:
                min = tmp
                min_i = i
    print(min + min_i - 2)
a, b = map(raw_input().split())

if a>b:
  print "a > b"

elif a<b:
  print "a < b"

else:
  print "a == b"

### FIXED CODE ###

a,b = map(int, raw_input().split())
 
if a > b:
  print 'a > b'
 
elif a < b:
  print 'a < b'
 
else:
  print 'a == b'
s=input()
zero=0
one=0
for i in s:
  if i="0":
    zero+=1
  elif i="1":
    one+=1
print(min(zero,one)*2)

### FIXED CODE ###

s=input()
zero=0
one=0
for i in s:
  if i=="0":
    zero+=1
  elif i=="1":
    one+=1
print(min(zero,one)*2)
D,T,S = map(int, input.split())

print("Yes" if D/(S*T)<=1 else "No")

### FIXED CODE ###


D,T,S = map(int, input().split())

print("Yes" if D/(S*T)<=1 else "No")