Harryxun/stf_run huggingface dataset:
[N,K]=map(int, raw_input().split())
C=[[] for i in range(11)]
D=[[0 for j in range(K+1)] for i in range(11)]
M=[0 for i in range(11)]

for i in range(N):
    c,g=map(int, raw_input().split())
    C[g].append(c)
    M[g]+=1
for i in range(1,11):
    y=sorted(C[i], reverse=True)
    for j in range(len(y)):
        n = j+1
        D[i][n] =y[j] + D[i][n-1] + 2*(n-1)

DP=[[0 for i in range(K+1)] for j in range(11)]

for g in range(1,11):
    for k in range(K+1):
        DP[g][k] = max( [ DP[g-1][k-x] + D[g][x] for x in range(min( k+1, M[g]+1 ) ) ] + [0] )
print DP[10][K]



### FIXED CODE ###

[N,K]=map(int, raw_input().split())
C=[[] for i in range(11)]
D=[[0 for j in range(N+1)] for i in range(11)]
M=[0 for i in range(11)]

for i in range(N):
    c,g=map(int, raw_input().split())
    C[g].append(c)
    M[g]+=1
for i in range(1,11):
    y=sorted(C[i], reverse=True)
    for j in range(len(y)):
        n = j+1
        D[i][n] =y[j] + D[i][n-1] + 2*(n-1)

DP=[[0 for i in range(K+1)] for j in range(11)]

for g in range(1,11):
    for k in range(K+1):
        DP[g][k] = max( [ DP[g-1][k-x] + D[g][x] for x in range(min( k+1, M[g]+1 ) ) ] + [0] )
print DP[10][K]
N = int(input())
S = [input() for _ in range(N)]

T = sorted(list(set(S)))
U = [S.count(T[i]) for i in range(len(T))]

for i in range(len(T)):
    if S.count(T[i]) == max(U):
        print(T[i])


### FIXED CODE ###

n = set(map(int, input().split()))
if len(n) == 2:
    print('Yes')
else:
    print('No')
a=float(input())
b=2*3.14.a
print(b)

### FIXED CODE ###

a=int(input())
print(2*3.14*a)
n = input()
s = input().split()
if len(set(s)) == n:
  print(YES)
else:
  print(NO)

### FIXED CODE ###

n = input()
a = list(input().split())

b = set(a)

if len(a) == len(b):
  print("YES")
else:
  print("NO")
n, k = map(int, input().split())
a = (list)(map(int, input().split()))

# print(-(-(n-1)//(k-1)))
print((n + (k - 1)) / k)


### FIXED CODE ###

from functools import reduce
n = (int)(input())
a = (list)(map(int, input().split()))


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


def calcMod(a, m):
  return sum([m % v for v in a])


def lcm(a, b):
  return a*b/gcd(a, b)


def lcm_list(l):
  g = reduce(lcm, l)
  return g


def mul(a, b):
  return a*b


#print(calcMod(a, (int)(lcm_list(a)-1)))
print(calcMod(a, reduce(mul, a)-1))
a,b,c=map(int,input().split())
if a*10+b>b*10+c:
  print(a*10+b+c)
else:
  print(b*10+c+a)

### FIXED CODE ###

a=int(input())
b=1110-a
print(b)
# coding: utf-8
# Your code here!

W,H,x,y =  list(map(float,input().split()))


if(W%x==0 and H%y==0):
    print (W*H/2,1)

else:
    print (W*H/2,0)


### FIXED CODE ###

# coding: utf-8
# Your code here!

X,A =  list(map(int,input().split()))

if X<A:
    print(0)
    
else:
    print(10)
from math import gcd

# = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))
mA = max(A)
counter = [0 for _ in range(mA+1)]

primenum = [2]
sgn = [-1 for _ in range(int(mA**0.5)+1)]
k = 3
while k**2 <= mA:
  if sgn[k] == -1:
    primenum.append(k)
    add = k*k
    ok = k
    while k**2 <= mA:
      sgn[ok] = 1
      ok += add
  k += 2
#prime_num が用意されているとき
def factorization(n):
  M = n
  for p in primenum:
    if p**2 > M:
      break
    else:
      if M%p == 0:
        if counter[p] == 0:
          counter[p] = 1
        else:
          return False
        while M%p == 0:
          M //= p

  if M > 1:
    if counter[M] == 0:
      counter[M] = 1
    else:
      return False
  return True



g = A[0]
flag = True
for k in range(N):
  a = A[k]
  g = gcd(g, a)
  if flag:
    flag = factorization(a)


if flag:
  print('pairwise coprime')
  exit()
if g == 1:
  print('setwise coprime')
else:
  print('not coprime')


### FIXED CODE ###

from math import gcd

# = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))
mA = max(A)
counter = [0 for _ in range(mA+1)]

primenum = [2]
sgn = [-1 for _ in range(int(mA**0.5)+1)]
k = 3
while k**2 <= mA:
  if sgn[k] == -1:
    primenum.append(k)
    add = k*k
    ok = k
    while ok**2 <= mA:
      sgn[ok] = 1
      ok += add
  k += 2
#prime_num が用意されているとき
def factorization(n):
  M = n
  for p in primenum:
    if p**2 > M:
      break
    else:
      if M%p == 0:
        if counter[p] == 0:
          counter[p] = 1
        else:
          return False
        while M%p == 0:
          M //= p

  if M > 1:
    if counter[M] == 0:
      counter[M] = 1
    else:
      return False
  return True



g = A[0]
flag = True
for k in range(N):
  a = A[k]
  g = gcd(g, a)
  if flag:
    flag = factorization(a)


if flag:
  print('pairwise coprime')
  exit()
if g == 1:
  print('setwise coprime')
else:
  print('not coprime')
while(1):
  count = input()
  if count == 0: break
  previous_cube = [1, 2, 3, 4, 5, 6]
  operation{'North':[2, 6, 3, 4, 1, 5], 'East':[4, 2, 1, 6, 5, 3], 'West': [3, 2, 6, 1, 5, 4], 'South':[5, 1, 3, 4, 6, 2], 'Right':[1, 3, 5, 2, 4, 6], 'Left[1, 4, 2, 5, 3, 6]}
  sum = 1
  for i in xrange(count):
    new_cube = []
    new_cube.append(previous_cube[operation[raw_input()][0]])
    sum += new_cube[0]
    previous_cube = new_ccube
  print sum

### FIXED CODE ###

while 1:
  n = input()
  if n == 0:  break
  d = range(1, 7)
  ans = 1
  for i in range(n):
    c = raw_input()[0]
    if c == 'N': S = [1,5,2,3,0,4]
    elif c == "S": S = [4,0,2,3,5,1]
    elif c == "E": S = [3,1,0,5,4,2]
    elif c == "W": S = [2,1,5,0,4,3]
    elif c == "R": S = [0,2,4,1,3,5]
    elif c == "L": S = [0,3,1,4,2,5]
    d = [d[s] for s in S]
    ans += d[0]
  print ans
n,m,k=map(int,input().split())
fr=[0 for _ in range(n)]
bl=[0 for _ in range(n)]
frl=[[] for i in range(n)]
bll=[[] for i in range(n)]
for i in range(m):
    a,b=map(int,input().split())
    fr[a-1]=fr[a-1]+1
    fr[b-1]=fr[b-1]+1
    frl[a-1].append(b)
    frl[b-1].append(a)

treelist=[]
hitobito=set()

def saiki(c):
    global treelist
    global hitobito
    global frl
    global bll
    global tmpset

    for tsugi in frl[c-1]:
        if not tsugi in hitobito:
            hitobito.add(tsugi)
            tmpset.add(tsugi)
            saiki(tsugi)

for i in range(n):
    tmpset=set()
    saiki(i+1)
    if not tmpset == set():
        treelist.append(tmpset)

print(treelist)

for i in range(k):
    a,b=map(int,input().split())
    bl[a-1]=bl[a-1]+1
    bl[b-1]=bl[b-1]+1
    bll[a-1].append(b)
    bll[b-1].append(a)



for i in range(n):
    for tree in treelist:
        if i+1 in tree:
            tmpsum=0
            for aaa in frl[i]:
                if aaa in tree:
                    tmpsum+=1
            for bbb in bll[i]:
                if bbb in tree:
                    tmpsum+=1 
            print(len(tree)-tmpsum-1)
    




### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)

n,m,k=map(int,input().split())
fr=[0 for _ in range(n)]
frl=[[] for i in range(n)]
frlist=[]
for i in range(m):
    a,b=map(int,input().split())
    frl[a-1].append(b)
    frl[b-1].append(a)
    frlist.append([a,b])

treelist=[]
hitobito=set()

def saiki(c,tmpi):
    global hitobito
    global tmpset
    global trbl
    
    if frl[c-1] == []:
        hitobito.add(c)
        tmpset.add(c)
        trbl[c-1]=tmpi
    
    for tsugi in frl[c-1]:
        if not tsugi in hitobito:
            hitobito.add(tsugi)
            tmpset.add(tsugi)
            trbl[tsugi-1]=tmpi
            saiki(tsugi,tmpi)

index=0
trbl=[None for _ in range(n)]
for i in range(n):
    tmpset=set()
    saiki(i+1,index)
    if not tmpset == set():
        treelist.append(tmpset)
        index+=1

bl=[0 for _ in range(n)]
bll=[[] for i in range(n)]
bllist=[]
for i in range(k):
    a,b=map(int,input().split())
    bll[a-1].append(b)
    bll[b-1].append(a)
    bllist.append([a,b])

for fre in frlist:
    if trbl[fre[0]-1] == trbl[fre[1]-1]:
        fr[fre[0]-1]=fr[fre[0]-1]+1
        fr[fre[1]-1]=fr[fre[1]-1]+1

for blo in bllist:
    if trbl[blo[0]-1] == trbl[blo[1]-1]:
        bl[blo[0]-1]=bl[blo[0]-1]+1
        bl[blo[1]-1]=bl[blo[1]-1]+1

output=[]
for i in range(n):
    tmpsum=fr[i]+bl[i]
    output.extend([str(len(treelist[trbl[i]])-tmpsum-1)," "])

print("".join(output))
import collections 
n,k = map(int,input().split())
A = list(map(int,input().split()))
B=[1]
m=0
for i in range(n):
    B.append(A[m])
    m=A[m]-1

D=collections.Counter(A)
for i in range(n):
    if D[i+1]==1:
        del D[i+1]

if D!={}:
    for i in range(len(B)):
        if B[i] in D.keys():
            M=B[i]
            j=i+1
            break
else:
    M=1
    j=1
l=j
while B[l]!=M:
    l+=1

T=l-j+1
print(B[k-((k-j)//T)*T])

### FIXED CODE ###

'''
path = 'sub1_51.txt'
f=open(path)
data1 = f.read()
f.close()
N=data1.split()
'''
n,k=map(int,input().split())
A=list(map(int,input().split()))
'''
n=int(N[0])
k=int(N[1])
A=N[2:]
'''
A=[int(i)-1 for i in A]
B=[]
cnt=[0]*n
m=0
for i in range(2*10**5):
    B.append(m)
    cnt[m]+=1
    if cnt[m]>1:
        break
    m=A[m]
c=len(B)-(B.index(m)+1)
print(1+B[(max(k-B.index(m),0))%c + min(B.index(m),k)])
#Bは街の移動順序
#cはループの長さ
a1=[map(int(),input().split())]
a2=[map(int(),input().split())]
a3=[map(int(),input().split())]
n=int(input())
b=[input() for i in range(n)]

line1=[]
line2=[]
line3=[]

for num in b:
    if num in a1:
        line1.append(a1.index(num))
    elif num in a2:
        line2.append(a2.index(num))
    elif num in a3:
        line3.append(a3.index(num))
if 0 in line1 and 0 in line2 and 0 in line3 or 1 in line1 and 1 in line2 and 1 in line3 or 2 in line1 and 2 in line2 and 2 in line3 :
    print("Yes")
elif 0 in line1 and 1 in line2 and 2 in line3 or 2 in line1 and 1 in line2 and 0 in line3:
    print("Yes")
elif 0 in line1 and 1 in line1 and 2 in line1 or 0 in line2 and 1 in line2 and 2 in line2 or 0 in line3 and 1 in line3 and 2 in line3:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import math
a=int(input())
print(math.ceil(a/2))
# -*- coding: utf-8 -*-
import math

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

A, B, C, D = map(int, input().split())
ans = 0
Am = 0
Bm = 0
df = 0

Am = A - (A // C + A // D - A //lcm_base(C,D))
Bm = B - (B // C + B // D - B //lcm_base(C,D))
ans = Bm - Am

if A % C != 0 and A % D != 0:
	ans += 1
print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
A, B, C, D = map(int, input().split())
ans = 0
Am = 0
Bm = 0
df = 0
t = 0

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

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

t = B - A + 1
Am = B // C - (A - 1) // C
Bm = B // D - (A - 1) // D
df = B // lcm(C, D) - (A - 1)//lcm(C, D)
ans = t - (Am + Bm) + df
print(ans)
O = input()
E = input()

password = O[0] + E[0]

if len(O)-len(E)==1:
    for i in range(1, len(O)-1):
        password = password + O[i] + E[i]
    password = password + O[i]
else:
    for i in range(1, len(O)):
        password = password + O[i] + E[i]

print(password)


### FIXED CODE ###

O = input()
E = input()

password = O[0] + E[0]

if len(O)-len(E)==1:
    for i in range(1, len(O)-1):
        password = password + O[i] + E[i]
    password = password + O[-1]
else:
    for i in range(1, len(O)):
        password = password + O[i] + E[i]

print(password)
n = int(input())
a = [int(i) for i in input().split()]


l = [0] * 1000000


for i in a:

    c = 2
    while True:
        l[i*c - 1] = 1
        c += 1
        if i*c-1 >= 1000000:
            break
sa = sorted(a)
ans = 0

for i in range(len(sa)):
    if l[sa[i]-1] == 0 and sa[i-1] != sa[i]:
        if not(i == 0 and sa[i+1] == sa[i]):
            ans += 1


print(ans)


### FIXED CODE ###

n = int(input())
A = list(map(int,input().split()))
 
maxA = max(A)
ans = 0
flag = [0]*(maxA+1)
 
# print(flag)
for a in A:
    for ax in range(a,maxA+1,a):
        flag[ax] +=1
 
# print(flag)
for a in set(A):
    if flag[a] == 1:
        ans += 1
print(ans)
import sys
import itertools

N = int(sys.stdin.readline().strip())

set_list = []
for line in sys.stdin.readlines():
    x, y, h = list(map(int, line.strip().split()))
    ans_set = set()
    for Cx, Cy in itertools.product(range(101), range(101)):
        dx = abs(x - Cx)
        dy = abs(y - Cy)
        d = dx + dy
        H = h + d
        # if H >= d:
        if H >= 1:
            ans_set.add((Cx, Cy, H))
    set_list.append(ans_set)

ans_set = set_list[0]
if len(set_list) > 1:
    for s in set_list[1:]:
        ans_set = ans_set & s

if len(ans_set) == 1:
    Cx, Cy, H = list(ans_set)[0]
    print(Cx, Cy, H)
#else:
#    for s in set_list:
#        Cx, Cy, H = list(ans_set)[0]
#        if H >= 1:
#            print(Cx, Cy, H)


### FIXED CODE ###

#!/usr/bin/env python
# vim:fileencoding=utf-8

import sys

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

if n == 1:
    print("Hello World")
elif n == 2:
    i = int(sys.stdin.readline().strip())
    j = int(sys.stdin.readline().strip())
    print(i + j)
from math import sqrt, inf

l, r = map(int, input().split())

flag = False
if r // 2019 - l // 2019 != 0:
    flag = True

if flag:
    print(0)
else:
    lmod = l % 2019
    rmod = r % 2019
    root = int(sqrt(2019))

    n1, n2 = inf, inf
    for i in range(lmod, rmod+1):
        if abs(i - root) < n1:
            tmp = n1
            n1 = i
            n2 = tmp
        elif abs(i - root) < n2:
            n2 = i

    print((n1 * n2) % 2019)


### FIXED CODE ###

l, r = map(int, input().split())

flag = False
if l % 2019 == 0 or r // 2019 - l // 2019 != 0:
    flag = True

if flag:
    print(0)
else:
    lmod = l % 2019
    rmod = r % 2019

    ans = 10**5
    for i in range(lmod, rmod):
        for j in range(i+1, rmod+1):
            ans = min((i * j) % 2019, ans)
    print(ans)
import re

regex = r'(dream|dreamer|erase|eraser)+$'

s = raw_input()

if re.match(regex, s):
  print("YES")
else:
  print("NO")

### FIXED CODE ###

import re

regex = r'(dream|dreamer|erase|eraser)+$'

s = input()

if re.match(regex, s):
  print("YES")
else:
  print("NO")
n = int(input())
h = list(input().split())
max_value = 0
cnt = 0
for i in range(1, n+1):
	if h[i-1] >= h[i]:
		cnt += 1
	else:
		max_value = max(max_value, cnt)
		cnt = 0
if cnt > max_value:
	max_value = cnt
print(max_value)

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
max_value = 0
cnt = 0
for i in range(1, n):
	if h[i-1] >= h[i]:
		cnt += 1
	else:
		max_value = max(max_value, cnt)
		cnt = 0

if cnt > max_value:
	max_value = cnt
print(max_value)
class FenwickTree:
    def __init__(self, n):
        self.n = n
        self.data = [0] * (n + 1)
        self.k_init = 2 ** (self.n - 1).bit_length()

    def sum(self, i):
        s = 0
        while i > 0:
            s += self.data[i]
            i -= i & -i
        return s

    def add(self, i, x):
        while i <= self.n:
            self.data[i] += x
            i += i & -i


def get_invnum(li):
    n = len(li)
    t = FenwickTree(max(li))
    res = 0
    for i in range(n):
        res += i - t.sum(li[i])
        t.add(li[i], 1)
    return res


N, *A = map(int, open(0).read().split())
triplet_sorted_A = [0] * N
triplet_sorted_A[::2] = sorted(A[::2])
triplet_sorted_A[1::2] = sorted(A[1::2])
print(get_invnum(triplet_sorted_A))


### FIXED CODE ###

from bisect import bisect_left


N, *A = map(int, open(0).read().split())
sorted_A = sorted(A)
ans = 0
for i in range(N):
    idx = bisect_left(sorted_A, A[i])
    if i % 2 != idx % 2:
        ans += 1
print(ans // 2)
w,h,n=map(int,raw_input().split())
x1=0,x2=w,y1=0,y2=h
for i in range(n):
    x,y,a=map(int,raw_input().split())
    if a==1: x1=max(x1,x)
    if a==2: x2=min(x2,x)
    if a==3: y1=max(y1,y)
    if a==4: y2=min(y2,y)
print max(0,x2-x1)*max(0,y2-y1)

### FIXED CODE ###

w,h,n=map(int,raw_input().split())
x1,x2,y1,y2=0,w,0,h
for i in range(n):
    x,y,a=map(int,raw_input().split())
    if a==1: x1=max(x1,x)
    if a==2: x2=min(x2,x)
    if a==3: y1=max(y1,y)
    if a==4: y2=min(y2,y)
print max(0,x2-x1)*max(0,y2-y1)
m1 = map(int,input().split()
m2 = map(int,input().split()

if m1[0] < m2[0]:
    print('1')
else:
    print('0')




### FIXED CODE ###

m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

# print(m1)
# print(m2)

if m1 < m2:
    print('1')
else:
    print('0')
N,Q = (int(X) for X in input().split())
S = input()
AIndex = [Ind for Ind,Str in enumerate(S) if S[Ind]=='A' and S[Ind+1]=='C']
CIndex = [X+1 for X in AIndex]
for T in range(0,Q):
    L,R = (int(X) for X in input().split())
    LIndex = [(L-1)<=X for X in AIndex]
    RIndex = [(R-1)>=X for X in CIndex]
    print(sum([X and Y for X,Y in zip(LIndex,RIndex)]))

### FIXED CODE ###

N,Q = (int(X) for X in input().split())
S = input()
T = [0]*(N+1)
for I in range(0,N):
     T[I+1] = T[I] + (S[I:I+2]=='AC')
for J in range(0,Q):
    L,R = (int(X)-1 for X in input().split())
    print(T[R]-T[L])
n = int(input())
a = [0]
for _ in range(n+1):
  a.append(int(input()))
visited = [False]*(n+1)
visited[1] = True
cnt = 0
but = 1
while True:
  nextb = a[but]
  if visited[nextb]:
    cnt = -1
    break
  elif nextb == 2:
    cnt += 1
    break
  else:
    but = nextb
    cnt += 1
    visited[but] = True
print(cnt)
    

### FIXED CODE ###

n = int(input())
a = [0]
for _ in range(n):
  a.append(int(input()))
visited = [False]*(n+1)
visited[1] = True
cnt = 0
but = 1
while True:
  nextb = a[but]
  if visited[nextb]:
    cnt = -1
    break
  elif nextb == 2:
    cnt += 1
    break
  else:
    but = nextb
    cnt += 1
    visited[but] = True
print(cnt)
import sys
mod = pow(10, 9) + 7
sys.setrecursionlimit(pow(10, 8))

def power(x, y):
    if   y == 0: return 1
    elif y == 1     : return x % mod
    elif y % 2 == 0 : return power(x, y//2)**2 % mod
    else: return power(x, (y-1)//2)**2 * x % mod
    
def mul(a, b):
    return ((a % mod) * (b % mod)) % mod

def div(a, b):
    return mul(a, power(b, mod-2))
def div2(a, b):
    return mul(a, modinv(b))

def modinv(a):
    b, u, v = mod, 1, 0
    while b:
        t = a//b
        a, u = a-t*b, u-t*v
        a, b, u, v = b, a, v, u
    u %= mod
    return u

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

NNN = (10**5)
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range( 2, NNN + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

r1, c1, r2, c2 = map(int, input().split())
r = 0
for j in range(c1, c2+1):
    r = (r + cmb(j+r2+1, r2, mod) - cmb(j+r1, r1-1, mod) ) %mod
print(r)


### FIXED CODE ###

import sys
mod = pow(10, 9) + 7
sys.setrecursionlimit(pow(10, 8))

def power(x, y):
    if   y == 0: return 1
    elif y == 1     : return x % mod
    elif y % 2 == 0 : return power(x, y//2)**2 % mod
    else: return power(x, (y-1)//2)**2 * x % mod
    
def mul(a, b):
    return ((a % mod) * (b % mod)) % mod

def div(a, b):
    return mul(a, power(b, mod-2))
def div2(a, b):
    return mul(a, modinv(b))

def modinv(a):
    b, u, v = mod, 1, 0
    while b:
        t = a//b
        a, u = a-t*b, u-t*v
        a, b, u, v = b, a, v, u
    u %= mod
    return u

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

NNN = (2*10**6+1)
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range( 2, NNN + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

r1, c1, r2, c2 = map(int, input().split())
r = 0
for j in range(c1, c2+1):
    r = (r + cmb(j+r2+1, r2, mod) - cmb(j+r1, r1-1, mod) ) %mod
print(r)
n = int(input())
s = [int(input()) for i in range(n)]

l = [s.count(i) for i in s]
d = {i:j for i,j in zip(s, l)}
m = max(l)

d = {i:j for i, j in zip(s, l)}
ans = [i for i in d if d[i] == m]
sorted(ans)

for i in ans:
    print(i)

### FIXED CODE ###

from collections import Counter

n = int(input())
s = [input() for i in range(n)]

d = Counter(s)
m = max(d.values())
ans = [i for i in d if d[i] == m]
ans = sorted(ans)

for i in ans:
    print(i)
N,L = map(int,input().split())
a = []
for i in range(N):
  a.append(L+i-1)
b = []
for i in a:
  b.append(abs(i))
for i in range(N):
  if abs(L+i-1) = min(b):
    print(sum(a)-L-i+1)

### FIXED CODE ###

N,L = map(int,input().split())
a = []
for i in range(1,N+1):
  a.append(L+i-1)
b = []
for i in a:
  b.append(abs(i))
for i in range(1,N+1):
  if abs(L+i-1) == min(b):
    print(sum(a)-L-i+1)
from collections import Counter
N = int(input())
n = N // 2

index = 0
g_inputs = []
k_inputs = []

for i in input().split():
    if index % 2 == 0:
        g_inputs.append(int(i))
        index += 1
    else:
        k_inputs.append(int(i))
        index += 1

g = Counter(g_inputs)
k = Counter(k_inputs)

g_max = max([(v,k) for k,v in g.items()])[1] 
k_max = max([(v,k) for k,v in k.items()])[1]

if g_max == k_max:
    del g[g_max]
    del k[k_max]
    g_max_2 = max([(v,k) for k,v in g.items()])[1] 
    k_max_2 = max([(v,k) for k,v in k.items()])[1]
    print(min(N - g_max - k_max_2, N - g_max_2 - k_max))
else:
    print(N - g[g_max] - k[k_max])

### FIXED CODE ###

from collections import Counter

N = int(input())

index = 0
even_numbers = []
odd_numbers = []

for i in input().split():
    if index % 2 == 0:
        even_numbers.append(int(i))
    else:
        odd_numbers.append(int(i))
    index += 1

even = Counter(even_numbers).most_common(2)
odd = Counter(odd_numbers).most_common(2)

if even[0][0] == odd[0][0]:
    if len(even) == 1:
        print(N//2)
    else:
        print(N - even[0][1] - max(even[1][1], odd[1][1]))
else:
    print(N - even[0][1] - odd[0][1])
n = int(input())
k = int(input())

from scipy.misc import comb
from math import factorial

n_d = len(str(n))
digits = str(n)

def get_num(top, k_val, d_num):
  #print(top, k_val, d_num)
  if d_num>n_d:
    return 1
  elif k_val==0:
    return 1
  elif top:
    below1 = get_num(True, k_val-1, d_num+1)
    below2 = (int(digits[d_num])-1) * get_num(False, k_val-1, d_num+1)
    below3 = get_num(False, k_val, d_num+1)
    return below1 + below2 + below3
  else:
    return factorial(n_d-d_num) / factorial(k_val) / factorial(n_d - d_num - k_val) * 9**(k_val)
    #return comb(n_d-d_num, k_val) * 9**(k_val)



if k<n_d :
  #a = comb(n_d-1, k)
  a = factorial(n_d-1) / factorial(k) / factorial(n_d-1 - k)
else:
  a = 0
a *= 9**k
#b = (int(digits[0]) - 1) * comb(n_d-1, k-1) * 9**(k-1)
c1 = get_num(True, k-1, 1)
c2 = (int(digits[0]) - 1) * get_num(False, k-1, 1)

#print(a, c1, c2)
print(int(a+c1+c2))

### FIXED CODE ###

N= int(input())
K= int(input())

from math import factorial

str_n = str(N)
len_n = len(str(str_n))

def conb(n, r):
    return factorial(n)//factorial(r)//factorial(n-r)
    
def get_num(top, k_val, depth):
    if k_val==0:
        return 1
    elif k_val>(len_n-depth+1):
        return 0
    elif top:
        if int(str_n[depth - 1])==0:
            return get_num(top, k_val, depth + 1)
        else:
            b1 = get_num(top, k_val - 1, depth + 1)
            b2 = (int(str_n[depth-1])-1) * get_num(False, k_val-1, depth+1)
            b3 = get_num(False, k_val, depth + 1)
            return b1+b2+b3
    else:
        return 9**(k_val) * conb(len_n - depth + 1, k_val)
    
    
a1 = get_num(True, K-1, 2)
a2 = (int(str_n[0])-1)*get_num(False, K-1, 2)
a3 = get_num(False, K, 2)

#print(a1, a2, a3)
print(a1+a2+a3)
a,b = map( int , raw_input().split() )

int(d) = a / b
int(r) = a % b
float(f) a / b

print "%d %d %f" %(d,r,f)

### FIXED CODE ###

a,b = map( int , raw_input().split() )

d = a / b
r = a % b
f = float(a) / float(b)

print "%d %d %f" %(d,r,f)