Harryxun/stf_run huggingface dataset:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())
xyh = []
for i in range(N):
    x, y, h = LI()
    xyh.append([x, y, h])


"""

C_x C_y H

XYの高度はmax(H - abs(X - C_x) - abs(Y - C_y), 0)
"""
xyh = sorted(xyh, key=lambda xyh: xyh[2], reverse=True)


ans = 0
for c_x in range(101):
    for c_y in range(101):
        H = -1
        for i, (x, y, h) in enumerate(xyh):
            if H == -1:
                H = h + abs(x - c_x) + abs(y - c_y)
            if H != h + abs(x - c_x) + abs(y - c_y):
                break
        else:
            ans = (c_x, c_y, H)
    
X, Y, H = ans
print(X, Y, H)



### FIXED CODE ###

#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())
xyh = []
for i in range(N):
    x, y, h = LI()
    xyh.append([x, y, h])


"""

C_x C_y H

XYの高度はmax(H - abs(X - C_x) - abs(Y - C_y), 0)
"""
xyh = sorted(xyh, key=lambda xyh: xyh[2], reverse=True)

# print(xyh)
ans = (0,0,0)
for c_x in range(101):
    for c_y in range(101):
        H = 0
        flag = True
        for i, (x, y, h) in enumerate(xyh):
            if i == 0:
                H = h + abs(x - c_x) + abs(y - c_y)
            if h != max(H - abs(x - c_x) - abs(y - c_y), 0):
            # if H != max(h + abs(x - c_x) + abs(y - c_y), 0):
                flag = False
        if flag:
            ans = (c_x, c_y, H)
    
X, Y, H = ans
print(X, Y, H)
N = int(input())
A = list(map(int, input().split(' ')))
B = list(map(int, input().split(' ')))

diff = []
neg = 0
count = 0

if sum(B) >  sum(A):
    print(-1)
    exit()

for a, b in zip(A, B):
    diff += [a-b]
    if a < b:
        count += 1
        neg += a - b

for d in reverse(diff):
    if neg >= 0:
        break
    count += 1
    neg += d

print(count)

### FIXED CODE ###

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

sum_A = sum(A)
sum_B = sum(B)

diff = []
neg = 0
count = 0

if sum_B > sum_A:
    print(-1)
    exit()

for a, b in zip(A, B):
    diff += [a-b]
    if a < b:
        count += 1
        neg += a - b

for d in sorted(diff, reverse=True):
    if neg >= 0:
        break
    count += 1
    neg += d

print(count)
import math
import itertools
import collections


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

route_list = []
wall = []
count = 0

for _ in range(10):
    array = list(map(int, input().split()))
    route_list.append(array)

for _ in range(h):
    array = list(map(int,input().split()))
    wall.append(array)

node_num = len(route_list) #ノードの数

route = []

for i in range(10):
    now = i
    unsearched_nodes = list(range(node_num)) # 未探索ノード
    distance = [math.inf] * node_num # ノードごとの距離のリスト
    distance[now] = 0 # 初期のノードの距離は0とする

    while len(unsearched_nodes) > 0:
        for node in range(node_num):
            if now == node:
                continue
            else:
                distance[node] = min(distance[now] + route_list[now][node], distance[node])
        unsearched_nodes.remove(now)
        if len(unsearched_nodes) > 0:
            now = unsearched_nodes[0]
    route.append(distance)

distance_to_one = []
for i in range(10):
    distance_to_one.append(route[i][1])

flattened_wall = list(itertools.chain.from_iterable(wall))

c = collections.Counter(flattened_wall)
for i, j in c.items():
    if i == -1:
        continue
    elif i == 1:
        collections
    else:
        count += distance_to_one[i] * j

print(count)

### FIXED CODE ###

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

WF = []
wall = []
ans = 0

for _ in range(10):
    array = list(map(int, input().split()))
    WF.append(array)

for _ in range(h):
    array = list(map(int,input().split()))
    wall.append(array)

for k in range(10):
    for i in range(10):
        for j in range(10):
            WF[i][j]=min(WF[i][j],WF[i][k]+WF[k][j])

for i in range(h):
    for j in range(w):
        num = wall[i][j]
        if num != -1:
            ans += WF[num][1]

print(ans)
#C
n, m = map(int, input().split())
k = [] * m
s = [] * m
p = [] * m
for i in range(m):
    ks = list(map(int, input().split()))
    k.append(ks[0])
    s.append(ks[1:])
p = list(map(int, input().split()))

# print(k, s, p)
for i in range(2 ** n):
    on = True
    for j in range(m):
        light = 0
        for k in s[j]:
            tmp = i >> k & 2
            light = (light + tmp) % 2
        if light != p[j]:
            on = False
            break
    ans += int(on)
print(ans)

### FIXED CODE ###

# C
n, m = map(int, input().split())
k =[0]*m
s = [0]*m
for i in range(m):
    lst=input().split()
    k[i] = int(lst[0])
    s[i] = [int(x) - 1 for x in lst[1:]]
p = [int(x) for x in input().split()]
# print(s, p)
ans=0
for i in range(2 ** n):
    all_on = True
    for j in range(m):
        light = 0
        for k in s[j]:
            tmp = i >> k & 1
            #iをkだけ左にシフトし1とのANDをとる
            #>>iのk番目が1の時１を返す
            light = (light + tmp) % 2
            # print(tmp,light)
        if light != p[j]:
            all_on = False
            # print(light,p[j])
            break
    ans += int(all_on)
print(ans)
n, a, b = map(int, input().split())

cnt=1
for i in range(n + 1):
    cnt*=i
    if i == a:
        af = cnt
    elif i == n-a:
        anf = cnt
    elif i == b:
        bf = cnt
    elif i == n-b:
        bnf = cnt
    elif i == n:
        nf=cnt
        break

ans = 2 ** n - (nf//af//anf) - (nf//bf//bnf)-1
print(int(ans % (10**9+7)))


### FIXED CODE ###


def bigcmb(N, R, MOD):  # nCr(mod p) #n>=10**7 #前処理不要
    if (R < 0) or (N < R):
        return 0
    R = min(R, N - R)
    fact, inv = 1, 1
    for i in range(1, R + 1):
        fact = (fact * (N - i + 1)) % MOD
        inv = (inv * i) % MOD
    return fact * pow(inv, MOD - 2, MOD) % MOD


n, a, b = map(int, input().split())
mod = 10 ** 9 + 7

exc = bigcmb(n, a, mod) + bigcmb(n, b, mod)
print((pow(2, n, mod) - exc - 1) % mod)
c1 = input().split()
c2 = input().split()
c3 = input().split()
print(c1[0]+c2[1]+c3[3])

### FIXED CODE ###

c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])
def gcd(x,y):
  if y == 0:
    return x
  else:
    return gcd(y,x%y)

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]


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

GCD = gcd(a,b)
count = 0
Primes = primes(GCD//2+1)

for prime in Primes:
    if GCD % prime == 0:
        count += 1
print(count+1)

### FIXED CODE ###

def gcd(x,y):
  if y == 0:
    return x
  else:
    return gcd(y,x%y)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr



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

GCD = gcd(a,b)

fac = factorization(GCD)

if fac[0][0] == 1:
    print(1)
else:
    print(len(factorization(GCD))+1)
# -*- coding: utf-8 -*-

def main():
    import sys

    def input(): return sys.stdin.readline().strip()
    def INT(): return int(input())
    def MAP(): return map(int, input().split())
    def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
    
    def query(i):
        s = intv
        i += 1
        while i > 0:
            s = max(s, tree[i-1])
            i -= i & -i
        return s
    
    def update(i, x):
        i += 1
        while i <= size:
            tree[i-1] = max(tree[i-1], x)
            i += i & -i

    n = INT()
    H = LIST()
    A = LIST()

    n += 1
    nv = 1
    while nv < n:
        nv *= 2
    size = nv
    intv = 0
    tree = [intv] * nv

    for h, a in zip(H, A):
        mx = query(h)
        update(h, mx + a)
    ans = query(n)
    print(ans)
main()


### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

class BIT:
    """ BIT汎用版 """

    def __init__(self, n, func, init):
        # 0-indexed
        n += 1
        nv = 1
        while nv < n:
            nv *= 2
        self.size = nv
        self.func = func
        self.init = init
        self.tree = [init] * nv
    
    def query(self, i):
        """ [0, i]の値を取得 """
        s = self.init
        i += 1
        while i > 0:
            s = self.func(s, self.tree[i-1])
            i -= i & -i
        return s
    
    def update(self, i, x):
        """ 値の更新：添字i, 値x """
        i += 1
        while i <= self.size:
            self.tree[i-1] = self.func(self.tree[i-1], x)
            i += i & -i

N = INT()
H = LIST()
A = LIST()

bit = BIT(N+1, max, 0)
for h, a in zip(H, A):
    # ここより手前で出現した自分より低い花から、一番いいところを取る
    mx = bit.query(h)
    # 自身の最善の値を更新
    bit.update(h, mx + a)
ans = bit.query(N)
print(ans)
N, K = map(int, input().split())
ans = 1
for _ in range(N):
  ans += min(ans*2, ans+K)
print(ans)

### FIXED CODE ###

N = int(input())
K = int(input())
ans = 1
for _ in range(N):
  ans = min(ans*2, ans+K)
print(ans)
def bc(x):
    n = 0
    while x:
        n += 1
        x &= x -1
    return n

def numChange(list, i):
    num = 0
    j = 0
    while True:
        if i < 0:
            break
        num += int(list[i]) * pow_r(2, j)
        i -= 1
        j += 1
    return num

def f(n):
    cnt = 0
    while True:
        if n == 0:
            break
        n = n % bc(n)
        cnt += 1
    return cnt

def pow_r(x, n):
    if n == 0:
        return 1
    if n % 2 == 0:
        return pow_r(x ** 2, n // 2)
    else:
        return x * pow_r(x ** 2, (n - 1) // 2)

if __name__ == "__main__":
    n = int(input())
    x = input()
    xList = list(x)
    k = len(xList) - 1
    for i in range(n):
        xList[i] = str(int(xList[i]) ^ 1)
        xNum = numChange(xList, k)
        print(f(xNum))
        xList[i] = str(int(xList[i]) ^ 1)
def bc(x):
    n = 0
    while x:
        n += 1
        x &= x -1
    return n

def numChange(list, i):
    num = 0
    j = 0
    while True:
        if i < 0:
            break
        num += int(list[i]) * pow_r(2, j)
        i -= 1
        j += 1
    return num

def f(n):
    cnt = 0
    while True:
        if n == 0:
            break
        n = n % bc(n)
        cnt += 1
    return cnt

def pow_r(x, n):
    if n == 0:
        return 1
    if n % 2 == 0:
        return pow_r(x ** 2, n // 2)
    else:
        return x * pow_r(x ** 2, (n - 1) // 2)

if __name__ == "__main__":
    n = int(input())
    x = input()
    xList = list(x)
    k = len(xList) - 1
    for i in range(n):
        xList[i] = str(int(xList[i]) ^ 1)
        xNum = numChange(xList, k)
        print(f(xNum))
        xList[i] = str(int(xList[i]) ^ 1)


### FIXED CODE ###

def f(n):
    cnt = 1
    while n > 0:
        n  %= bin(n).count('1')
        cnt += 1
    return cnt

if __name__ == "__main__":
    n = int(input())
    x = input()
    d = x.count('1')
    if d == 1:
        for i in x[:-1]:
            if i == '0':
                print(1)
            else:
                print(0)
        if x[-1] == '1':
            print(0)
        else:
            print(2)
        exit()

    ans = []
    M = 0
    for i in x:
        M <<= 1
        if i == '1':
            M += 1
    p = M % (d + 1)
    m = M % (d - 1)
    for i in range(n):
        if x[i] == '0':
            ans.append(f((p + pow(2, n - i - 1, d + 1)) % (d + 1)))
        else:
            ans.append(f((m - pow(2, n - i - 1, d - 1)) % (d - 1)))
    print(*ans, sep='\n')
import itertools
 
N = int(input)
coord = [list(map(int, input().split())) for _ in range(N)]
dis = 0

for order in itertools.permutations(range(N)):
  for i in range(1, N):
    dis += ((coord[order[i]][0]-coord[order[i-1]][0])**2 + (coord[order[i]][1]-coord[order[i-1]][1])**2)**0.5
 
Ave = dis / N
print(Ave)

### FIXED CODE ###

import itertools
 
N = int(input())
coord = [list(map(int, input().split())) for _ in range(N)]
dis = 0

for order in itertools.permutations(range(N)):
  for i in range(1, N):
    dis += ((coord[order[i]][0]-coord[order[i-1]][0])**2 + (coord[order[i]][1]-coord[order[i-1]][1])**2)**0.5
 
ave = dis / len(list(itertools.permutations(range(N))))
print(ave)
s = str(input())
s_list = list(s)
ans_1 = 'no'
ans_2 = 'no'
s_list_len = len(s_list)
if s_list[0] == 'A':
    ans_1 = 'ok'
count = 0
for i,j in enumerate(s_list[2:s_list_len-1]):
    if j == 'C':
        s_list.pop(2+i)
        count += 1
if count == 1:
    ans_2 = 'ok'
ans_3 = 'ok'
for i in s_list[1:]:
    if not i.islower():
        ans_3 = 'no'
if (ans_1 == 'ok') and (ans_2 == 'ok') and (ans_3 == 'ok'):
    print('AC')
else:
    print('WA')

### FIXED CODE ###

s = str(input())
s_list = list(s)
ans_1 = 'no'
ans_2 = 'no'
ans_3 = 'ok'
check = 'no'
s_list_len = len(s_list)
if s_list[0] == 'A':
    ans_1 = 'ok'
count = 0
for i,j in enumerate(s_list[2:s_list_len-1]):
    if j == 'C':
        count += 1
        if check == 'no':
            s_list.pop(2+i)
        check = 'yes'
if count == 1:
    ans_2 = 'ok'
for i in s_list[1:]:
    if not i.islower():
        ans_3 = 'no'
if (ans_1 == 'ok') and (ans_2 == 'ok') and (ans_3 == 'ok'):
    print('AC')
else:
    print('WA')
w = input()
h = input()
print(w*h)


### FIXED CODE ###

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

print(str(w*h) + ' ' + str((w+h)*2))
n = int(input())
c = list(input())#ciが R のとき赤、W のとき白
a = c.count("R")
b = 0
count = max(a, b)
# a: R->W, b: W->Rの回数
for i in range(n+1):
  if c[i] == "R":
    a = a - 1
  else:
    b = b + 1
  ans = max(a, b)
  count = min(ans, count)
print(count)
 


### FIXED CODE ###

n = int(input())
c = list(input())#ciが R のとき赤、W のとき白
a = c.count("R")
b = 0
count = max(a, b)
# a: R->W, b: W->Rの回数
for i in range(n):
  if c[i] == "R":
    a = a - 1
  else:
    b = b + 1
  ans = max(a, b)
  count = min(ans, count)
print(count)
n,m = map(int,input().split())
a = []
mod = 10**9+7
for i in range(m):
    b = int(input())
    a.append(b)
d = [0 for i in range(n+1)]
d[0] = 0
d[1] = 1
d[2] = 2
for i in range(3,n+1):
    d[i] = d[i-1] + d[i-2]
ans = 1
if a[0] == 1:
    ans = 1
else:
    ans = ans*d[a[0]-1]%mod
for i in range(m-1):
    ans = ans*d[a[i+1]-a[i]-2]%mod
ans = ans*d[n-a[m-1]-1]%mod
print(ans)

### FIXED CODE ###

n =  int(input())
d = list(map(int,input().split()))
d.sort()
kmin = d[n//2-1]
kmax = d[n//2]
print(kmax-kmin)
n,k=map(int,input().split())
d=dict()
for i in map(int,input().split()):
  if i not in d:
    d[i]=1
  else:
    d[i]+=1
m=list(d.keys())
m.sort()
n-=k
for i in m:
  if n<=0:
    break
  n-=d[i]
  ans+=1
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
d=dict()
for i in map(int,input().split()):
  if i not in d:
    d[i]=1
  else:
    d[i]+=1
m=list(d.values())
m.sort()
a=len(m)-k
ans=0
for i in m:
  if a<=0:
    break
  a-=1
  ans+=i
print(ans)
import math

A, B, C, D = map(int, input().split())

AtoB = (B - (A - 1))

divisible_C = (B // C) - ((A - 1) // C)
divisible_D = (B // D) - ((A - 1) // D)

minLcm = (C * D) // math.gcd(C, D)

divisible_CD = (B // minLcm) - ((A - 1) // minLcm)

divisible_CandD = (divisible_C + divisible_D) - divisible_CD

answer = AtoB - divisible_CandD

print(answer)

### FIXED CODE ###

import fractions


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


A, B, C, D = map(int, input().split())

AtoB = (B - (A - 1))

divisible_C = (B // C) - ((A - 1) // C)
divisible_D = (B // D) - ((A - 1) // D)

minLcm = lcm(C, D)

divisible_CD = (B // minLcm) - ((A - 1) // minLcm)

divisible_CtoD = (divisible_C + divisible_D) - divisible_CD

answer = AtoB - divisible_CtoD

print(answer)
alphabet = ['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']
cnt = 26 * [0]
Input = ""
loop = True

while loop:
    I = input()
    if I == '':
        loop = False
    Input += I

for i1 in range(len(alphabet)):
    for i2 in range(len(Input)):
        if 'A' <= Input[i2] <= 'Z':
            w = Input[i2].lower()
        else:
            w = Input[i2]
        if alphabet[i1] == w:
            cnt[i1] += 1
    print(alphabet[i1] + " : " + str(cnt[i1]))

### FIXED CODE ###

import sys

alphabet = ['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']
cnt = 26 * [0]
Input = ""
loop = True

for I in sys.stdin:
    Input += I

for i1 in range(len(alphabet)):
    for i2 in range(len(Input)):
        if 'A' <= Input[i2] <= 'Z':
            w = Input[i2].lower()
        else:
            w = Input[i2]
        if alphabet[i1] == w:
            cnt[i1] += 1
    print(alphabet[i1] + " : " + str(cnt[i1]))
A,B = map(str, input().split())

S =  input()


if S.count("-") == 1 and S[A] == "-":
    ans = "Yes"
else:
    ans = "No"

print(ans)


### FIXED CODE ###

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

S =  input()


if  S[A] == "-" and S.count("-") == 1:
    ans = "Yes"
else:
    ans = "No"

print(ans)
N, K = map(int, input().split())
num = 0
while q > 0:
  num = num + 1
  q = N // (K**num)
A = num + 1
print(A)

### FIXED CODE ###

N, K = map(int, input().split())
num = 0
q = N
while q > 0:
	num = num + 1
	q = N // (K**num)
print(num)
import numpy as np
n,d=list(map(int, input().split()))
x=[list(map(int,input().split())) for i in range(n)]
y=np.array(x)
count=0
for i in range(n):
	for j in range(i+1,d):
		dist=np.linalg.norm(y[i]-y[j])
		if dist.is_integer:
			count+=1
print(count)

### FIXED CODE ###

n, d = map(int, input().split())
x = [[int(i) for i in input().split()] for i in range(n)] 
dist2 = 0
count = 0
for i in range(n-1):
    for j in range(i+1,n):
        for k in range(d):
            dist2 += (x[i][k]-x[j][k])**2
        dist = dist2**0.5 
        dist2=0
        if dist.is_integer():
            count += 1 
print(count)
N = int(input())
X = input()
popcount_X = X.count('1')
numX = int(X, 2)
a, b = numX % (popcount_X + 1), numX % (popcount_X - 1)
for i, x in enumerate(X, 1):
    if x == '1' and popcount_X == 1:
        print(0); continue
    ans = 1
    if x == '1':
        temp = (b - pow(2, N - i, popcount_X - 1)) % (popcount_X - 1)
    else:
        temp = (a + pow(2, N - i, popcount_X + 1)) % (popcount_X + 1)
    while temp:
        p = format(temp, 'b').count('1')
        temp %= p
        ans += 1
    print(ans)

### FIXED CODE ###

N = int(input())
X = input()
popcount_X = X.count('1')
numX = int(X, 2)
a, b = numX % (popcount_X + 1), numX % (popcount_X - 1) if popcount_X != 1 else 0
for i, x in enumerate(X, 1):
    if x == '1' and popcount_X == 1:
        print(0); continue
    ans = 1
    if x == '1':
        temp = (b - pow(2, N - i, popcount_X - 1)) % (popcount_X - 1)
    else:
        temp = (a + pow(2, N - i, popcount_X + 1)) % (popcount_X + 1)
    while temp:
        p = format(temp, 'b').count('1')
        temp %= p
        ans += 1
    print(ans)
N = int(input())
print(N + N*N + N **300

### FIXED CODE ###

N = int(input())
print(N + N*N + N **3)
alphabet = 'abcdefghijklmnopqrstuvwxyz'
from collections import defaultdict

adict = defaultdict(int)

while True:
    str_in = input().lower()
    for c in str_in:
        adict[c] += 1
    try:
        if str_in[-1] == '.':
            break
    except:
        break

for k in alphabet:
    print('%s : %i' %(k, adict[k]))

### FIXED CODE ###

alphabet = 'abcdefghijklmnopqrstuvwxyz'
from collections import defaultdict
import sys

adict = defaultdict(int)

for l in sys.stdin:
    for c in l.lower():
        adict[c] += 1
        
for k in alphabet:
    print('%s : %i' %(k, adict[k]))
n, k = map(int, input().split())
A = list(map(int, input().strip().split()))

b = 0
e = max(A)
L = e // 2
while e - b >= 1:
    m = sum(list(map(lambda x: x // L, A)))
    if m <= k:
        e = L
        L = (e + b) // 2
    else:
        b = L
        L = (e + b) // 2
print(e)


### FIXED CODE ###

n, k = map(int, input().split())
A = list(map(int, input().strip().split()))

b = 0
e = max(A)
L = e // 2
while e - b > 1:
    L = (e + b) // 2
    m = sum(list(map(lambda x: (x - 1) // L, A)))
    if m <= k:
        e = L
    else:
        b = L
print(e)
n = int(input())
c = []
bs = 0
for i in range(n):
  a,b = map(int,input().split())
  bs += b
  c.append(a+b)

c.sort()

ans = -bs
for i in range(n,0,-1):
  if i%2==0: ans += c[i]
    
print(ans)


### FIXED CODE ###

n = int(input())
c = []
bs = 0
for i in range(n):
  a,b = map(int,input().split())
  bs += b
  c.append(a+b)

c.sort()

ans = -bs
for i in reversed(range(n)):
  cnt = n-1-i
  if cnt%2==0: ans += c[i]
    
print(ans)
n=int(input())
dp=[0]*(n+1)
dp[0]=1
dp[1]=0
dp[3]=0
s=0
for i in range(3,n+1):
    s+=dp[i-3]
    s=s%1000000009
    dp[i]=s
print(dp[n])

### FIXED CODE ###

import sys
n=int(input())
dp=[0]*(n+1)
dp[0]=1
s=0
for i in range(3,n+1):
    s+=dp[i-3]
    s=s%1000000007
    dp[i]=s
dp[0]=0
print(dp[n])
input()
a = [int(x) for x in input().split()]
    
for i in a:
  B = i%2
  if B==0:
    if i%3 == i%5 and i>=6:
      print("APPROVED")
    else:
      print("DENIED")
  else:
    print("DENIED")

### FIXED CODE ###

a,b,c = [int(x) for x in input().split()]
if (a == b and b!=c) or (a==c and a!=b) or (b==c and b!=a):
  print("Yes")
else:
  print("No")
import numpy as np
N,K = map(int,input().split())
score = list(map(int,input().split()))


for i in range(N-K):
    multi = np.prod(score[i:K+i])
    check = np.prod(score[i+1:K+i+1])
    if multi>=check:
        print("No")
    else:
        print("Yes")


### FIXED CODE ###

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

for i in range(N-K):
    if score[i]<score[i+K]:
        print("Yes")
    else:
        print("No")