Harryxun/stf_run huggingface dataset:
N=input()
K=int(input())
m=len(N)

dp0=[[0]*(m+1) for _ in range(m+1)]
dp1=[[0]*(m+1) for _ in range(m+1)]
dp1[0][0]=1
for i in range(1,m+1):
    dp0[i][0]=1
    
for i in range(m):
    for j in range(m):
        if N[i]=='0':
            dp0[i+1][j+1]=dp0[i][j]*9 + dp0[i][j+1]
            dp1[i+1][j+1]=dp1[i][j+1]
        else:
            dp0[i+1][j+1]=dp0[i][j]*9 + dp0[i][j+1]+dp1[i][j]*(int(N[i])-1)+dp1[i][j+1]
            dp1[i+1][j+1]=dp1[i][j]
print(dp0[-1][K]+dp1[-1][K])

### FIXED CODE ###

N=input()
K=int(input())
m=len(N)
 
dp0=[[0]*(m+1) for _ in range(m+1)]
dp1=[[0]*(m+1) for _ in range(m+1)]
dp1[0][0]=1
for i in range(1,m+1):
    dp0[i][0]=1
    
for i in range(m):
    for j in range(m):
        if N[i]=='0':
            dp0[i+1][j+1]=dp0[i][j]*9 + dp0[i][j+1]
            dp1[i+1][j+1]=dp1[i][j+1]
        else:
            dp0[i+1][j+1]=dp0[i][j]*9 + dp0[i][j+1]+dp1[i][j]*(int(N[i])-1)+dp1[i][j+1]
            dp1[i+1][j+1]=dp1[i][j]
if m<K:
  print(0)
else:
  print(dp0[-1][K]+dp1[-1][K])
W,H,x,y,r = map(int, raw_input().split())
if r <= x <= W-r and r <= y <= H-r:
    print "Yes"
else:
    print "No"

### FIXED CODE ###

W,H,x,y,r = map(int, input().split())
if r <= x <= W-r and r <= y <= H-r:
    print ('Yes')
else:
    print ('No')
# A_1からスタートして、同じA_iに戻ってくるまでの[移動回数][到着場所]をリスト化

import sys
readline = sys.stdin.readline

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

route = [0]
visited = set()
while True:
  nex = A[route[-1]] - 1
  if nex in visited:
    loopstart = route.index(nex)
    break
  else:
    visited.add(nex)
    route += [nex]

before_loop,one_loop = route[:loopstart],route[loopstart:]

if K <= len(before_loop):
  print(before_loop(K) + 1)
else:
  K -= len(before_loop)
  K %= len(one_loop)
  print(one_loop[K] + 1)


### FIXED CODE ###

# A_1からスタートして、同じA_iに戻ってくるまでの[移動回数][到着場所]をリスト化

import sys
readline = sys.stdin.readline

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

route = [0]
visited = {0}
while True:
  nex = A[route[-1]] - 1
#  print(route[-1]," -> ",nex)
  if nex in visited:
#    print(nex,"is already visited")
    loopstart = route.index(nex)
#    print("loopstart =",loopstart)
    break
  else:
    visited.add(nex)
    route += [nex]
    
#print("route",route)

before_loop,one_loop = route[:loopstart],route[loopstart:]
#print("before_loop",before_loop)
#print("one_loop",one_loop)

if K <= len(before_loop) - 1:
  print(before_loop[K] + 1)
else:
  K -= len(before_loop)
  K %= len(one_loop)
  print(one_loop[K] + 1)
# @profile
def main():
    import copy
    import math

    # N=int(input())
    # a = list(map(int,input().split()))

    # N=5
    # a = [12,15,18,36,42]

    N = 10**5
    a = [1]*N

    # N=10
    # a = [56,58,82,46,67,36,98,68,24,46]

    #a,bの最大公約数
    def gcd(a, b):
        while b:
            a, b = b, a % b
        return a

    # 一番近い大きい側の2の累乗の数が，segtreeの葉の数になる．
    N_ADJUST = 2**int(math.ceil(math.log2(N)))
    # segtreeのサイズはN_ADJUSTを葉とする木のノード数．
    ST_SIZE = N_ADJUST*2-1
    # binopに合わせて単位元として決める．maxならINT_MAX(問題文の制限)
    INT_IDENTITY = 0
    li = [INT_IDENTITY]*ST_SIZE
    # li_initは，葉の配列．
    # 節点kが [l,r) にbinopという演算で結びついている．
    def init_segtree(li, k, l, r, binop, li_init):
        if r-l==1:
            li[k] = INT_IDENTITY if l >= len(li_init) else li_init[l]
        elif r-l>1:
            k_l, k_r = k*2+1, k*2+2
            init_segtree(li, k_l, l, (l+r)//2, binop, li_init)
            init_segtree(li, k_r, (l+r)//2, r, binop, li_init)
            li[k] = binop(li[k_l],li[k_r])

    init_segtree(li,0,0,N_ADJUST,gcd,a)

    # print(li)
    # 下からupdateする．
    def update_segtree(li,k,binop):
        if k > 0:
            k_l, k_r = ((k-1)//2)*2+1, ((k-1)//2)*2+2
            li[(k-1)//2] = binop(li[k_l],li[k_r])
            update_segtree(li,k//2,binop)

    val = []
    for i in range(N_ADJUST-1,N_ADJUST+N-1):
        tmp = li[i]
        li[i] = 0
        update_segtree(li,i,gcd)
        # print(i, li)
        val.append(li[0])
        li[i] = tmp
        update_segtree(li,i,gcd)

    print(max(val))

main()


### FIXED CODE ###

# @profile
def main():
    import math

    N=int(input())
    a = list(map(int,input().split()))

    # N=5
    # a = [12,15,18,36,42]

    # N = 10**5
    # a = [1]*N

    # N=11
    # a = [56,58,82,46,67,36,98,68,24,46,52]

    #a,bの最大公約数
    def gcd(a, b):
        while b:
            a, b = b, a % b
        return a

    # 一番近い大きい側の2の累乗の数が，segtreeの葉の数になる．
    N_ADJUST = 2**int(math.ceil(math.log(N)/math.log(2)))
    # segtreeのサイズはN_ADJUSTを葉とする木のノード数．
    ST_SIZE = N_ADJUST*2-1
    # binopに合わせて単位元として決める．maxならINT_MAX(問題文の制限)
    INT_IDENTITY = 0
    li = [INT_IDENTITY]*ST_SIZE
    # li_initは，葉の配列．
    # 節点kが [l,r) にbinopという演算で結びついている．
    def init_segtree(li, k, l, r, binop, li_init):
        if r-l==1:
            li[k] = INT_IDENTITY if l >= len(li_init) else li_init[l]
        elif r-l>1:
            k_l, k_r = k*2+1, k*2+2
            init_segtree(li, k_l, l, (l+r)//2, binop, li_init)
            init_segtree(li, k_r, (l+r)//2, r, binop, li_init)
            li[k] = binop(li[k_l],li[k_r])

    init_segtree(li,0,0,N_ADJUST,gcd,a)

    # print(li)
    # 下からupdateする．
    def update_segtree(li,k,binop):
        if k > 0:
            k_2 = (k-1)//2
            k_l = k_2*2+1
            k_r = k_l+1
            li[k_2] = binop(li[k_l],li[k_r])
            update_segtree(li,k_2,binop)

    val = []
    for i in range(N_ADJUST-1,N_ADJUST+N-1):
        tmp = li[i]
        li[i] = 0
        update_segtree(li,i,gcd)
        # print(i, li)
        val.append(li[0])
        li[i] = tmp
        update_segtree(li,i,gcd)

    print(max(val))

main()
def rec(n):
    if n == 1: return 1
    return rec(n/2)*2+1

n = int(input())
ans = 0
ans += rec(n)
print(ans)

### FIXED CODE ###

import math
h = int(input())
l = 1

while (h != 1):
    h = math.floor(h / 2)
    l += 1
ans = 0

for i in range(l):
    ans += 2**i
print(ans)
a, b = map(int, input().split())
r = "-1"
for price in range(1010):
    tax_8 = int(price * 0.08)
    tax_10 = int(price * 0.1)
    if tax_8 == a and tax_10 == b :
        r = price
        braek
print(r)

### FIXED CODE ###

a, b = map(int, input().split())
r = -1
for price in range(1010):
    tax_8 = int(price * 0.08)
    tax_10 = int(price * 0.1)
    if tax_8 == a and tax_10 == b:
        r = price
        break
print(r)
import numpy as np
a,b = map(int,input().split())

ans = 0
for i in range(1,13):
    if i <= a and i <= b:
        ans += 1

print(ans)

### FIXED CODE ###

import numpy as np
a,b = map(int,input().split())
ans = 0
for i in range(1,13):
    if i < a:
        ans += 1
    elif i == a:
        if i <= b:
            ans += 1

print(ans)
import sys
sys.setrecursionlimit(10**9)

H, W = map(int, input().split())
field = [list(input()) for _ in range(H)]
MOD = 10 ** 9 + 7
count = [0]
dp = [[-1] * W for _ in range(H)]

def dfs(x, y):
  ret = 0
  for nx, ny in ((1,0), (0,1)):
    nx += x
    ny += y
    if nx == W-1 and ny == H-1:
      ret += 1
    elif dp[ny][nx] > -1:
      ret += dp[ny][nx]
    elif nx < W and ny < H:
      if field[ny][nx] == "#":
        ret += dfs(nx, ny)
  dp[y][x] = ret % MOD
  return ret

dfs(0,0)
print(dp[0][0])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

H, W = map(int, input().split())
field = [list(input()) for _ in range(H)]
MOD = 10 ** 9 + 7
count = [0]
dp = [[-1] * W for _ in range(H)]

def dfs(x, y):
  ret = 0
  for nx, ny in ((1,0), (0,1)):
    nx += x
    ny += y
    if nx == W-1 and ny == H-1:
      ret += 1
      continue
    elif nx >= W or ny >= H:
      continue
    elif dp[ny][nx] > -1:
      ret += dp[ny][nx]
      continue
    elif field[ny][nx] == "#":
      continue
    else:
      ret += dfs(nx, ny)
  dp[y][x] = ret % MOD
  return ret

dfs(0,0)
print(dp[0][0])
A =[] 
while True:
    try:
        A.append(sorted(list(map(int,input().split())),reverse=True))

    except:
        break
        #または、quit(),os.exit()をして止める。


def triangle_types(X):
    print(X)
    num_of_acute = 0
    num_of_right = 0
    num_of_obtuse = 0
    num_of_normal = 0
    for i in range(len(X)):
        a,b,c = [j for j in X[i]]
        ans = b**2 + c**2 - a**2
        if (a < b + c):
            num_of_normal+=1
            if (ans > 0):
                num_of_acute+=1
            elif (ans == 0):
                num_of_right+=1
            elif (ans < 0):
                num_of_obtuse+=1
            else:
                print("{} {} {} {}".format(num_of_normal,num_of_right,num_of_acute,num_of_obtuse))
                return
        else:
            print("{} {} {} {}".format(num_of_normal,num_of_right,num_of_acute,num_of_obtuse))
            return
    
if __name__ == '__main__':
    triangle_types(A)



### FIXED CODE ###

A=[]
while True:
    try:
        A.append(sorted(list(map(int,input().split())),reverse=True))

    except:
        break

def triangle_types(X):
    num_of_normal = 0
    num_of_right = 0
    num_of_acute = 0
    num_of_obtuse = 0

    for i in range(len(X)):
        a,b,c = [X[i][j] for j in range(3)]
        if (a < b + c and b < a + c and c < a + b):
            num_of_normal +=1
            if (a**2 == b**2 + c**2):
                num_of_right += 1
            elif (a**2 < b**2 + c**2):
                num_of_acute +=1
            elif (a**2 > b**2 + c**2):
                num_of_obtuse += 1
        else:
            print("{} {} {} {}".format(num_of_normal,num_of_right,num_of_acute,num_of_obtuse))
            return


if __name__ == '__main__':
    triangle_types(A)
import math
import itertools
import numpy as np
import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
A = IL()

ans = math.gcd(A[0],A[1])
for i in A:
  if i%ans != 0:
    ans = math.gcd(ans,i)
  if ans == 1:
    break

print(ans)

### FIXED CODE ###

import itertools
import numpy as np
import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

N = I()
A = IL()

ans = gcd(A[0],A[1])
for i in A:
  if i%ans != 0:
    ans = gcd(ans,i)
  if ans == 1:
    break

print(ans)
apples =str(input())
apples_list = apples.split(" ")
N = int(apples_list[0])
L = int(apples_list[-1])
pai_values = []

for i in range(1,N+1):
    pai_value = i + L -1
    pai_values.append(pai_value)

min_pai = abs(pai_values[0])

for j in range(N):
    if min_pai > abs(pai_values[j]):
        min_pai = abs(pai_values[j])
        target_number = j

pai_values.pop(target_number)

print(sum(pai_values))

### FIXED CODE ###

apples =str(input())
apples_list = apples.split(" ")
N = int(apples_list[0])
L = int(apples_list[-1])
pai_values = []
 
for i in range(1,N+1):
    pai_value = i + L -1
    pai_values.append(pai_value)
    
min_pai = abs(pai_values[0])
target_number = 0
 
for j in range(N):
    if min_pai > abs(pai_values[j]):
        min_pai = abs(pai_values[j])
        target_number = j
        
pai_values.pop(target_number)
 
answer = sum(pai_values)
 
print(int(answer))
import sys
sys.setrecursionlimit(10000)

h = int(input())
h_dash = h if h % 2 == 0 else h - 1


def f(n):
    if n == 2:
        return 3
    return f(n // 2) * 2 + 1


print(f(h_dash))


### FIXED CODE ###

h = int(input())

n = 1
while h >= 2 ** n:
    n += 1
print(2 ** n - 1)
N=int(input())
if N = N/2:
  p=float(0.5000000)
else:
  p=float((N-1)/2N)
print(p)
  

### FIXED CODE ###

N=int(input())
if int((N+1)/2) == int(N/2):
  p=float(0.50000000)
else:
  p=float((N+1)/(2*N))
print(p)
import sys
H, W, M= map(int,input().split())
height = [0] * H
width = [0] * W
object = []
for i in range(H):
   wi = [0] * W
   object.append(wi)
for s in sys.stdin.readlines():
    h, w = map(int, s.split())
    height[h-1] += 1
    width[w-1] += 1
    object[h-1][w-1] = 1
h_max = max(height)
w_max = max(width)
cand_w = []
cand_h = []
for i in range(W):
   if width[i] == w_max:
      cand_w.append(i)
for i in range(H):
   if height[i] == h_max:
      cand_h.append(i)
ans = h_max + w_max - 1
p = len(cand_h)*len(cand_w)
if M >= p:
   for i in range(len(cand_h)):
      for j in range(len(cand_w)):
         if object[cand_h[i]][cand_w[j]] == 0:
            ans = h_max + w_max          
else:
   ans += 1
print(ans) 

### FIXED CODE ###

import copy
import sys
H, W, M= map(int,input().split())
height = [0]*H
width = [0]*W
object = []
for s in sys.stdin.readlines():
    h, w = map(int, s.split())
    height[h-1] += 1
    width[w-1] += 1
    object.append([h-1, w-1])
h_max = max(height)
w_max = max(width)
cand_w = []
cand_h = []
for i in range(W):
   if width[i] == w_max:
      cand_w.append(i)
for i in range(H):
   if height[i] == h_max:
      cand_h.append(i)
ans = h_max + w_max
c = 0
p = len(cand_h)*len(cand_w)
cand_h = set(cand_h)
cand_w = set(cand_w)
if M >= p:
   for i in range(len(object)):
      if object[i][0] in cand_h and object[i][1] in cand_w:
         c += 1
print(ans - (c == p))
N = int(input())
H = list(map(int, input().split()))

cnt = 0
for i in range(len(H)):
    if (max(H[0:i+1]) == H[i]):
        cnt += 1

print(cnt)


### FIXED CODE ###

A,B = map(int,input().split())
if A == B:
	print(A+B)
elif A < B:
    print(B*2-1)
else:
    print(A*2-1)
h, w = map(int, input().split())
    # h,w=1000000000, 1000000000
    ki = int(h/2) + h%2
    gu = int(h/2)

    sum_ki = ki *(int(w/2) + w%2)
    sum_gu = gu * (int(w / 2) )
    print(sum_ki+sum_gu)

### FIXED CODE ###

def b():
    h, w = map(int, input().split())
    if (h == 1) or (w == 1):
        print("1")
    else:
        ki = int(h / 2) + h % 2
        gu = int(h / 2)

        sum_ki = ki * (int(w / 2) + w % 2)
        sum_gu = gu * (int(w / 2))
        print(sum_ki + sum_gu)


def c():
    a, b, c = map(int, input().split())
    ab = 4 * a * b
    a_b_c = c - (a + b)
    a_b_c_2 = a_b_c ** 2
    if a_b_c <= 0:
        print("No")
    else:
        if ab < a_b_c_2:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    b()
cin = open(0).read().strip().split('\n')
n,q=map(int, cin[0].split(' '))
ab = [tuple(map(int, a.split(' '))) for a in cin[1:n]]
px = [tuple(map(int, a.split(' '))) for a in cin[n:n+q]]

def dfs(g, idx, seen):
    global score

    seen[idx] = True
    for i in g[idx]:
        if seen[i]: continue
        score[i] += score[idx]
        dfs(g, i, seen)

g = [[] for _ in range(n)]
for abi in ab:
    # 無向グラフはお互いが参照し合う
    g[abi[0]-1].append(abi[1]-1)
    g[abi[1]-1].append(abi[0]-1)

score = [0]*n
for pxi in px:
    score[pxi[0]-1] += pxi[1]

seen = [False]*n
dfs(g, 0, seen)

print(' '.join(map(str, score)))

### FIXED CODE ###

cin = open(0).read().strip().split('\n')
n, q = map(int, cin[0].split(' '))
ab = [tuple(map(int, a.split(' '))) for a in cin[1:n]]
px = [tuple(map(int, a.split(' '))) for a in cin[n:n+q]]

import sys
sys.setrecursionlimit(10**9)

def dfs(g, seen, idx):
    global score

    seen[idx] = True
    for i in g[idx]:
        if seen[i]: continue
        score[i] += score[idx]
        dfs(g, seen, i)

g = [[] for _ in range(n)]
for abi in ab:
    g[abi[0]-1].append(abi[1]-1)
    g[abi[1]-1].append(abi[0]-1)

score = [0]*n
for pxi in px:
    score[pxi[0]-1] += pxi[1]

seen = [False]*n
dfs(g, seen, 0)

print(' '.join(map(str, score)))
n, t = map(int, input().split())

a = []

for i in range(n):
  cost, time = map(int, input().split())
  if time <= t:
    a.append(cost)

a.sort()
print(a[0])

### FIXED CODE ###

n, t = map(int, input().split())

a = []

for i in range(n):
  cost, time = map(int, input().split())
  if time <= t:
    a.append(cost)

if len(a) is 0:
  print("TLE")
else:
  a.sort()
  print(a[0])
s = input()
ans = []
for _ in s:
    if _ == 'B':
        ans.pop()
    else:
        ans.append(_)
print(*ans, sep='')

### FIXED CODE ###

s = input()
ans = []
for _ in s:
    if _ == 'B':
        if len(ans) != 0:
            ans.pop()
    else:
        ans.append(_)
print(*ans, sep='')
import sys,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

n = onem()
print(10**4)
a = [i + n//(10**4) for i in range(10**4)]

if n%2 == 0:
    print(jo(a))
else:
    for i in range(n):
        if n%(10**4) >= i+1:
            a[i] += 10**4 - n%(10**4) -1
        else:
            a[i] -= n%(10**4)
    print(jo(a))

### FIXED CODE ###

import sys,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

n = onem()
print(50)
a = [i + n//(50) for i in range(50)]

if n%(50) == 0:
    print(jo(a))
else:
    for i in range(50):
        if n%(50) >= i+1:
            a[i] += 50 - n%(50) +1
        else:
            a[i] -= n%(50)
    print(jo(a))
n = int(input())
a = [int(x) for x in input().split()]

def gcd(x, y):
    #print('gcd({0},{1})'.format(x,y))
    if (y==0):
        return x
    else:
        return gcd(y, x%y)

def gcd_left(i):
    #print('gcd_left({0})'.format(i))

    if i==-1:
        return 0
    else:
        return gcd(gcd_left(i-1), a[i])

def gcd_right(i):
    #print('gcd_left({0})'.format(i))
    
    if i==n:
        return 0
    else:
        return gcd(a[i],gcd_right(i+1))

def gcd_excepts(i):
    #print('gcd_excepts({0})'.format(i))
    if n==1:
        return a[i]
    else:
        return gcd( gcd_left(i-1), gcd_right(i+1))

m = [gcd_excepts(i) for i in range(n)]

print(max(m))

### FIXED CODE ###

n = int(input())
a = [int(x) for x in input().split()]

def gcd(x, y):
    #print('gcd({0},{1})'.format(x,y))
    if (y==0):
        return x
    else:
        return gcd(y, x%y)

def gcd_left(i):
    #print('gcd_left({0})'.format(i))

    if i<=-1:
        return 0
    else:
        if l[i]:
            return gcd(gcd_left(i-1), a[i])
        else:
            l[i] = gcd( gcd_left(i-1), gcd_right(i+1))


def gcd_right(i):
    #print('gcd_left({0})'.format(i))
    
    if i>=n:
        return 0
    else:
        return gcd( a[i], gcd_right(i+1))

def gcd_left_update(ls, i):
    #print('gcd_left({0})'.format(i))

    if i<0:
        return 0
    elif i==0:
        return a[i]
    else:        
        return gcd(ls[i-1], a[i])


def gcd_right_update(ls, i):
    #print('gcd_right({0})'.format(i))
    
    if i>=n:
        return 0
    elif i==n-1:
        return a[i]
    else:
        return gcd( a[i], ls[i+1])

def gcd_excepts(i):
    #print('gcd_excepts({0})'.format(i))
    return gcd( gcd_left(i-1), gcd_right(i+1))

def gcd_excepts2(i):
    #print('gcd_excepts2({0})'.format(i))
    left = 0
    right = 0
    if i-1<0:
        left = 0
    else:
        left = l[i-1]
    
    if i+1>=n:
        right = 0
    else:
        right = r[i+1]
        
    return gcd( left, right )

l = [None for i in range(n)]
for i in range(n):
    l[i] = gcd_left_update(l,i)

r = [None for i in range(n)]
for i in reversed(range(n)):
    r [i] = gcd_right_update(r,i)
    
m = [gcd_excepts2(i) for i in range(n)]

print(max(m))
n = input()
words_org = []
for i in range(n):
  words_org.append(input())
countDic = { k: words_org.count(k) for k in set(words_org) }
ranking = sorted([item for item in countDic.items()], key = lambda x:x[1])
order = 0
top = ranking[0][1]
candidates = []
while ranking[order][1] == top:
  candidates.append(ranking[order][0])
  order += 1
for word in sorted(candidates):
  print(word)

### FIXED CODE ###

N = input()
dic = {}
max = 0
for i in range(int(N)):
  word = input()
  if word not in dic.keys():
    
    if max == 0:
      max += 1
    dic[word] = 1
    
  else:
    
    if max == dic[word]:
      max += 1
    dic[word] += 1

candidates = sorted([word for word in dic.keys() if dic[word] == max])
for word in candidates:
  print(word)
hw,*aaa = open(1).read().splitlines()

h,w = map(int, hw.split())

print('#'*(w+2))
for aa in aaa:
    print(f'#{aa}#')
print('#'*(w+2))

### FIXED CODE ###

hw,*aaa = open(0).read().splitlines()

h,w = map(int, hw.split())

print('#'*(w+2))
for aa in aaa:
    print(f'#{aa}#')
print('#'*(w+2))
def calc_triangle(list):
    a, b, c = list.sprit()

    a_2 = a ** 2
    b_2 = b ** 2
    c_2 = c ** 2

    if a_2 == b_2 + c_2 or b_2 == a_2 + c_2 or c_2 == a_2 + b_2:
        print "YES"
    else:
        print "NO"



N = input()
a = []
for i in range(N):
    a.append(input())
    
for i in range(N):
    calc_triangle(a[i])

### FIXED CODE ###

N = input()
a = []
for i in range(N):
    a.append(map(int, raw_input().split()))

for j in range(N):

    x = a[j][0] ** 2
    y = a[j][1] ** 2
    z = a[j][2] ** 2

    if x == y + z:
        print "YES"
    elif y == x + z:
        print "YES"
    elif z == x + y:
        print "YES"
    else:
        print "NO"
#n//m=kかつn%m=kはつまりn=k(m+1)、また、k<m

n=int(input())
fct =[]

sq = int(n**(1/2))+2
ans = 0
for i in range(1,sq):
    if n%i==0:
        j = n//i-1
        if n//j==n%j:#境界処理が面倒なので試す
            ans +=j

print(ans)



### FIXED CODE ###

#n//m=kかつn%m=kはつまりn=k(m+1)、また、k<m

n=int(input())

sq = int(n**(1/2))+2
ans = 0
for i in range(1,sq):
    if n%i==0:
        j = n//i-1
        if j:#nが小さいと0になる？
            if n//j==n%j:#境界処理が面倒なので試す
                ans +=j

print(ans)
s =int(input())
int h = s/3600
int m = (s/60)%60
int sec = s%60
print("h:m:sec")


### FIXED CODE ###

x = int(input())
h =x/3600
m =(x/60)%60
sec = x%60
str = "%d:%d:%d"%(h,m,sec)
print(str)
import sys
read = sys.stdin.readline
import time
import math
import itertools as it
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N = int(input())
if 400 <= N and N <= 599:
    ans = 8
elif 600 <= N and N <= 799:
    ans = 7
elif 800 <= N and N <= 99:
    ans = 6
elif 1000 <= N and N <= 1199:
    ans = 5
elif 1200 <= N and N <= 1399:
    ans = 4
elif 1400 <= N and N <= 1599:
    ans = 3
elif 1600 <= N and N <= 1799:
    ans = 2
elif 1800 <= N and N <= 1999:
    ans = 1


print(ans)



# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)


### FIXED CODE ###

import sys
read = sys.stdin.readline
import time
import math
import itertools as it
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N = int(input())
if 400 <= N and N <= 599:
    ans = 8
elif 600 <= N and N <= 799:
    ans = 7
elif 800 <= N and N <= 999:
    ans = 6
elif 1000 <= N and N <= 1199:
    ans = 5
elif 1200 <= N and N <= 1399:
    ans = 4
elif 1400 <= N and N <= 1599:
    ans = 3
elif 1600 <= N and N <= 1799:
    ans = 2
elif 1800 <= N and N <= 1999:
    ans = 1


print(ans)



# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)