Harryxun/stf_run huggingface dataset:
import math
MOD = 10 ** 9 + 7

X, Y = map(int, input().split())

if (X + Y) % 3 != 0:
    print (0)
    exit()

x = X - (X + Y) // 3
y = Y - (X + Y) // 3

if x < y:
    x, y = y, x

tmp = math.factorial(y)

ans = 1
for i in range(x + 1, x + y + 1):
    ans *= i

ans //= tmp

ans %= MOD

print (ans)

### FIXED CODE ###

import math
MOD = 10 ** 9 + 7

X, Y = map(int, input().split())

if (X + Y) % 3 != 0:
    print (0)
    exit()

x = X - (X + Y) // 3
y = Y - (X + Y) // 3

if x < 0 or y < 0:
    print (0)
    exit()

if x < y:
    x, y = y, x

# tmp = math.factorial(y)
tmp = 1
for i in range(1, y + 1):
    tmp *= i
    tmp %= MOD

ans = 1
for i in range(x + 1, x + y + 1):
    ans *= i
    ans %= MOD

def modinv(a, m): #mod. m でのaの逆元 a^{-1}を計算する
    b = m
    u = 1
    v = 0
    while b:
        t = a//b
        a -= t * b
        a, b = b, a
        u -= t * v
        u, v = v, u
    
    u %= m
    if u < 0:
        u += m
    return u

tmp = modinv(tmp, MOD)

ans *= tmp

ans %= MOD

print (ans)

# print (x, y)
n, m = map(int, input().split())
if n >= m:
  print(0)
else:
  x = sorted(list(map(int, input().split())))

  y = []
  for i in range(m-1):
    y.append(h[i+1] - h[i])

  y_sorted = sorted(y, reverse=True)

  ans = 0
  for _y in y[n:]:
    ans += _y
  print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
if n >= m:
  print(0)
else:
  x = sorted(list(map(int, input().split())))

  y = []
  for i in range(m-1):
    y.append(x[i+1] - x[i])

  y_sorted = sorted(y, reverse=True)

  ans = 0
  for _y in y_sorted[n-1:]:
    ans += _y
  print(ans)
# -*- coding: <encoding name> -*-

s = input()
s_former = s[:(len(s) - 1) / 2 + 1]
s_latter = s[(len(s) + 3) / 2 + 1:]
print('Yes' if s == s[::-1] and s_former == s_former[::-1] and s_latter == s_latter[::-1] else 'No')


### FIXED CODE ###

S = input()
N = len(S)
S1 = S[0:(N-1)//2]
S2 = S[(N+3)//2-1:N+1]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")
n = int(input())
b = list(map(int, input().split()))
b.sort()
if n == 2:
    print(b[-1]-b[0])
    print(b[-1], b[0])
    exit()
# 同符号
if b[0] > 0 and b[-1] > 0:
    ans = sum(b) - 2*b[0]
    print(ans)
    print(b[1], b[0])
    left = b[1] - b[0]
    right = b[-1]
    for i in range(2, n-1):
        x = left
        y = b[i]
        print(x, y)
        left = x - y
    print(right, left)
elif b[0] < 0 and b[-1] < 0:
    ans = -sum(b) + 2*b[-1]
    print(ans)
    b = b[::-1]
    print(b[0], b[1])
    left = 0
    right = b[0] - b[1]
    for i in range(2, n):
        x = right
        y = b[i]
        print(x, y)
        right = x - y
# 異符号
else:
    ans = abs(sum(abs(i) for i in b))
    print(ans)
    # 正,負がそれぞれ一つ以上ある
    # まず、正 - 負をして正を作って、負に引く
    now = 1
    left = b[0]
    right = b[-1]
    # 二個目以上の負を全部消化
    while b[now] <= 0:
        x = right
        y = b[now]
        print(x, y)
        right = x - y
        now += 1
    for i in range(now, n-1):
        x = left
        y = b[i]
        print(x, y)
        left = x - y
    print(right, left)

### FIXED CODE ###

n = int(input())
b = list(map(int, input().split()))
b.sort()
if n == 2:
    print(b[-1]-b[0])
    print(b[-1], b[0])
    exit()
if b[0] == 0 and b[-1] == 0:
    print(0)
    for i in range(n-1):
        print(0,0)
elif b[0] > 0 and b[-1] > 0:
    ans = sum(b) - 2*b[0]
    print(ans)
    print(b[1], b[0])
    left = b[1] - b[0]
    right = b[-1]
    for i in range(2, n-1):
        x = left
        y = b[i]
        print(x, y)
        left = x - y
    print(right, left)
elif b[0] < 0 and b[-1] < 0:
    ans = -sum(b) + 2*b[-1]
    print(ans)
    b = b[::-1]
    print(b[0], b[1])
    left = 0
    right = b[0] - b[1]
    for i in range(2, n):
        x = right
        y = b[i]
        print(x, y)
        right = x - y
else:
    ans = abs(sum(abs(i) for i in b))
    print(ans)
    now = 1
    left = b[0]
    right = b[-1]
    while b[now] < 0:
        x = right
        y = b[now]
        print(x, y)
        right = x - y
        now += 1
    for i in range(now, n-1):
        x = left
        y = b[i]
        print(x, y)
        left = x - y
    print(right, left)
import sys
from fractions import gcd
input = sys.stdin.readline
N, X, D = map(int, input().split())
a = [(0, 0)]
for i in range(1, N + 1):
  l = X * i + D * i * (i - 1) // 2
  r = X * i + D * (i * N - i * (i + 1) // 2)
  if r < l: l, r = r, l
  a.append((l, r))
a.sort()
#print(a)
d = abs(D) // abs(gcd(X, D))
#print(d)
res = 0
for i in range(N + 1):
  l, r = a[i]
  t = 1 + (r - l) // abs(D)
  if i + d <= N:
    if r >= a[i + d][0]: t -= 1 + (r - a[i + d][0]) // abs(D)
  if t > 0: res += t
  #print(t)
print(res)

### FIXED CODE ###

import sys
from fractions import gcd
from collections import defaultdict as dd
from bisect import bisect_left as bl
input = sys.stdin.readline
N, X, D = map(int, input().split())
if D == 0:
  if X == 0: print(1)
  else: print(N + 1)
  exit(0)
a = dd(list)
a[0].append((0, 0))
d = abs(D) // abs(gcd(X, D))
#print(d)

for i in range(1, N + 1):
  l = X * i + D * i * (i - 1) // 2
  r = X * i + D * (i * N - i * (i + 1) // 2)
  if r < l: l, r = r, l
  a[i % d].append((l, r))

res = 0
for x in a.keys():
  s = set()
  for l, r in a[x]:
    s.add(l)
    s.add(r)
    s.add(r + 1)
  xs = sorted(s)
  table = [0] * (len(xs) + 1)
  for l, r in a[x]:
    ll = bl(xs, l)
    rr = bl(xs, r + 1)
    table[ll] += 1
    table[rr] += -1
  for i in range(len(xs)): table[i + 1] += table[i]
  l = xs[0]
  for i in range(len(xs)):
    if table[i]:
      if l == -1: l = xs[i]
      continue
    res += (xs[i - 1] - l) // abs(D) + 1
    l = -1

print(res)
from collections import Counter
n = int(input().strip())
a = list(map(int, input().strip().split()))
cnt1 = Counter(a[::2]).most_common(2)
c11, c12 = (cnt1 if len(cnt1) == 2 else cnt1+[('', 0)])
cnt2 = Counter(a[1::2]).most_common(2)
c21, c22 = (cnt2 if len(cnt2) == 2 else cnt2+[('', 0)])

if c11[0] != c21[0]:
    print(n - c11[1] - c21[1])
else:
    print(n - max(c11[1]+c22[1], c12[1]+c21[1]))

### FIXED CODE ###

from collections import Counter
n = int(input().strip())
a = list(map(int, input().strip().split()))
cnt1 = Counter(a[::2]).most_common(2)
c11, c12 = (cnt1 if len(cnt1) == 2 else cnt1+[('', 0)])
cnt2 = Counter(a[1::2]).most_common(2)
c21, c22 = (cnt2 if len(cnt2) == 2 else cnt2+[('', 0)])

if c11[0] != c21[0]:
    print(n - c11[1] - c21[1])
else:
    print(n - max(c11[1]+c22[1], c12[1]+c21[1]))
s=input()
lis=[]
n=1
output=0
for i in range(len(s)-1):
    if s[i]!=s[i+1]:
        lis.append(n)
        n=1
    else:
        n+=1

    if i==len(s)-2:
        lis.append(n)
#print(lis)

loop=True
while loop:
    a=lis[0]
    b=lis[1]
    if a==b:
        output+=a*2
        del lis[0]
        del lis[0]
    elif a<b:
        output+=a*2
        lis[1]-=a
        del lis[0]
    elif a>b:
        if len(lis)<2:
            output+=b*2
            loop=False
        else:
            lis[2]+=abs(b-a)
            output+=b*2
            del lis[0]
            del lis[0]
    if len(lis)==0 or len(lis)==1:
        loop=False
print(output)
    


### FIXED CODE ###

s=input()
n0=0
n1=0
for i in s:
    if i=="0":
        n0+=1
    else:
        n1+=1
print(2*min(n0,n1))
z = input()
if z=='hi' or z=='hihi' or z=='hihihi' or z=='hihihihi' or z=='hihihihihi':
  return "Yes"
else:
  return "No"

### FIXED CODE ###

z = input()

if z=='hi' or z=='hihi' or z=='hihihi' or z=='hihihihi' or z=='hihihihihi':
    print("Yes")
else:
    print("No")
n=int(input())
a=list(map(int,input().split()))
alice=0
bob=0
a=sorted(a)
while a:
    alice+=a[-1]
    a.pop()
    bob+=a[-1]
    a.pop()
print(alice-bob)

### FIXED CODE ###

N = int(input())
a = list(map(int,input().split()))
alice = 0
bob = 0
a.sort(reverse=True)
for i in range(N):
    if i%2 == 0:
        alice += a[i]
    else:
        bob += a[i]
print(alice - bob)
import math
na = lambda: list(map(int, input().split()))
A,B,C,D = na()
ee = (C * D)//math.gcd(C, D)
A = A-1
cc = B//C
dd = B//D
ansb = cc+dd-B//ee
ansa = A//C+A//D-A//ee
print(B-A-(ansb-ansa))

### FIXED CODE ###

import fractions
na = lambda: list(map(int, input().split()))
A,B,C,D = na()
ee = (C * D)//fractions.gcd(C, D)
A = A-1
cc = B//C
dd = B//D
ansb = cc+dd-B//ee
ansa = A//C+A//D-A//ee
print(B-A-(ansb-ansa))
import math
def calculate(arr1,arr2,zeroExist):
    if (len(arr1) % 2 == 0) or (zeroExist == True):
        return sum(arr2) - sum(arr1)
    else:
        return sum(arr2) - sum(arr1) - 2 * (calculateAbsSmallest(arr1,arr2))



def concatList(arr1,arr2):
    arr3 = list([])
    arr3.extend(arr1)
    arr3.extend(arr2)
    return arr3

def calculateAbsSmallest(arr1,arr2):
    arr1.sort()
    arr2.sort()
    return min(-arr1[0],arr2[0])


N = int(input())

arr1 = []
arr2 = []
zeroExist = False
for s in input().split(" "):
    if int(s) == 0:
        zeroExist = True
    if int(s) < 0:
        arr1.append(int(s))
    else:
        arr2.append(int(s))

arr1 = list(arr1)
arr2 = list(arr2)

res = calculate(arr1,arr2,zeroExist)
print(res)






### FIXED CODE ###

import math
def calculate(arr1,arr2,zeroExist):
    if (len(arr1) % 2 == 0) or (zeroExist == True):
        return sum(arr2) + sum(arr1)
    else:
        return sum(arr2) + sum(arr1) - 2 * (calculateAbsSmallest(arr1,arr2))


def calculateAbsSmallest(arr1,arr2):
    arr1.sort()
    arr2.sort()
    if len(arr2) == 0:
        return arr1[0]
    return min(arr1[0],arr2[0])

N = int(input())

arr1 = []
arr2 = []
zeroExist = False
for s in input().split(" "):
    if int(s) == 0:
        zeroExist = True
    if int(s) < 0:
        arr1.append(abs(int(s)))
    else:
        arr2.append(int(s))

arr1 = list(arr1)
arr2 = list(arr2)

res = calculate(arr1,arr2,zeroExist)
print(res)
p = list(map(int,input().split()))
max = 0
sum = 0
for i in range(1,p[0]+1):
    sum += p[i]
    a = p[i]
    if max < a :
        max = a
print(int(sum-(int(max/2))))



### FIXED CODE ###

N = list(map(int,input().split()))
p = []
for i in range(N[0]):
  p.append(int(input()))
max = 0
sum = 0
for i in range(N[0]):
    sum += p[i]
    a = p[i]
    if max < a :
        max = a
print(int(sum-(int(max/2))))
icase=0
if icase==0:
    n=int(input())  #数値入力 「N」だけの入力のとき
    a=[]
    b=[]
    c=[]
    for i in range(n):
       ai,bi,ci=map(int, input().split())
       a.append(ai)
       b.append(bi)
       c.append(ci)
elif icase==1:
    n=2
    a=[1,5]
    b=[2,4]
    c=[3,6]
elif icase==2:
    n=6
    a=[3, 14, 159, 2, 6, 53]
    b=[58, 9, 79, 323, 84, 6]
    c=[2643, 383, 2, 79, 50, 288]
    
a.sort()
b.sort()
c.sort()
   
icnt=0
ast=0
cst=0
for i in range(n):
    if a[n-1]<=b[i]:
        ast=n
#        print("a1:",ast-1,a[ast-1],i,b[i])
    else:
        while a[ast]<b[i] and ast<n-1:
            ast=ast+1
#            print("a2:",ast-1,a[ast-1],i,b[i])
    if b[i]<c[0]:
        cst=0 
#        print("c1:",cst,c[cst],i,b[i])
    else:
        while b[i]>=c[cst] and cst<n-1:
            cst=cst+1
#            print("c2:",cst-1,c[cst-1],i,b[i])
#    print(ast,i,n-cst)
    icnt=icnt+(ast)*(n-cst)
    
print(icnt)

### FIXED CODE ###

icase=0
if icase==0:
    n=int(input())  #数値入力 「N」だけの入力のとき
    a=list(map(int, input().split()))
    b=list(map(int, input().split()))
    c=list(map(int, input().split()))
elif icase==1:
    n=2
    a=[1,5]
    b=[2,4]
    c=[3,6]
elif icase==2:
    n=6
    a=[3, 14, 159, 2, 6, 53]
    b=[58, 9, 79, 323, 84, 6]
    c=[2643, 383, 2, 79, 50, 288]
    
a.sort()
b.sort()
c.sort()
   
icnt=0
ast=0
cst=0
for i in range(n):
    if a[n-1]<=b[i]:
        ast=n
#        print("a1:",ast-1,a[ast-1],i,b[i])
    elif a[0]>=b[i]:
        ast=0
#        print("a1:",ast-1,a[ast-1],i,b[i])
    else:
        while a[ast]<b[i] and ast<n-1:
            ast=ast+1
#            print("a2:",ast-1,a[ast-1],i,b[i])
    if b[i]<c[0]:
        cst=0 
    elif b[i]>=c[n-1]:
        cst=n 
#        print("c1:",cst,c[cst],i,b[i])
    else:
        while b[i]>=c[cst] and cst<n-1:
            cst=cst+1
#            print("c2:",cst-1,c[cst-1],i,b[i])
#    print(ast,i,n-cst)
    icnt=icnt+(ast)*(n-cst)
    
print(icnt)
import fractions
from functools import reduce

def gcd(numbers):
    return reduce(fractions.gcd, numbers)

n = int(input())
print(gcd(list(map(int, input().split()))))

### FIXED CODE ###

n, m = map(int, input().split())
temp = list(map(int, input().split()))
temp = set(temp[1:])
for i in range(n-1):
	temp2 = list(map(int, input().split()))
	temp2 = set(temp2[1:])
	temp = temp.intersection(temp2)
print(len(temp))
import sys
line = sys.stdin.readline().strip("\n").split(" ")
print(line[0]%line[1])

### FIXED CODE ###

line = input().split()
a, b = int(line[0]), int(line[1])
print(a%b)
x = map(int,input().split())
print(x.index(0))

### FIXED CODE ###

x = list(map(int,input().split()))
print(x.index(0)+1)
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit = 1000000

input  = stdin.readline

n,m = list(map(int,input().split()))
par = [[] for _ in range(n+1)]
dis = [0]*(n+1)
vis = dis[:]

def dfs(n):
	for i in par[n]:
		dis[i] = max(dis[i], dis[n]+1)
		dfs(i)

for _ in range(m):
	x,y = map(int,input().split())
	par[x].append(y)

for i in range(1,n+1):
	if not vis[i]:
		dfs(i)

print(max(dis))


### FIXED CODE ###

import collections
import sys
from functools import lru_cache
sys.setrecursionlimit(int(10**9))
n, m  = [int(i) for i in input().strip().split(' ')] 
edges = collections.defaultdict(list)
for i in range(m):
    s,d = [int(i) for i in input().strip().split(' ')]
    edges[s-1].append(d-1) 
# dp = [-1]*n
maxPath = 0 
@lru_cache(None)
def dfs(node): 
    ans = 0 
    for i in edges[node]:
        ans = max(ans,dfs(i)+1)
    return ans
 
for i in range(n):
    maxPath = max(dfs(i), maxPath) 
print(maxPath)
N = int(input())

for i in 11:
    x = 1000*i - N
ans = x % 1000
print(ans)

### FIXED CODE ###

N = int(input())

for i in range(1,11):
    x = 1000 * i - N
    if x < 0:
        continue
    else:
        print(x)
        exit()
s = str(input())
s_ = list(s)
for i in range(len(s)):
  if s_[i]=='?' and i>0 and s_[i-1]=='P':
    s_[i]='D'
  elif s_[i]=='?' and s_[i+1]=='D':
    s_[i]='P'
  elif s_[i]=='?' and s_[i+1]=='P':
    s_[i]='D'
  elif s_[i]=='?':
    s_[i]='P'
    
S = "".join(s_)
print(S)

### FIXED CODE ###

s = str(input())
s_ = list(s)
for i in range(len(s)):
  if s_[i]=='?':
    s_[i]='D'
S = "".join(s_)
print(S)
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n = int(input())
for i in range(2,min(n-1,int(n**.5)+1)):
# for i in range(2,n*+1):
  if n % i == 0:
    tmp = n

    while tmp % i == 0:
      tmp //= i
    if tmp % i == 1:ans += 1
  
    if tmp //i ==
    tmp = n; i = n // i
    while tmp % i == 0:
      tmp //= i
    if tmp % i == 1:ans += 1

  elif (n-1) % i == 0:ans += 2

if n != 1:ans += 2
else: ans += 1
print(ans)


### FIXED CODE ###

#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n = int(input())
for i in range(2,min(n-1,int(n**.5)+1)):
# for i in range(2,n*+1):
  if n % i == 0:
    tmp = n

    while tmp % i == 0:
      tmp //= i
    if tmp % i == 1:ans += 1

    if n //i == i or n //i == n or n // i == n-1:continue

    tmp = n; i = n // i
    while tmp % i == 0:
      tmp //= i
    if tmp % i == 1:ans += 1

  elif (n-1) % i == 0:
    if (n-1)//i != i and  (n-1) //i != n and (n-1) // i != n-1:ans += 2
    else: ans += 1

if n != 2:ans += 2
else: ans += 1
print(ans)
from math import gcd

### FIXED CODE ###

from functools import reduce
from fractions import gcd
N, X = map(int, input().split())
x = [abs(X-int(i)) for i in input().split()]
print(reduce(gcd, x))
N ,K = map(int, input().split())
L = list(map(int, input().split()))
snake = 0
for i in range(K+1):
  snake += L[i]
print(snake)

### FIXED CODE ###

n,k=map(int,input().split())
l=list(map(int,input().split()))
l.sort(reverse=True)
snake=0
for i in range(k):
  snake+=l[i]
print(snake)
import sys
input = sys.stdin.readline
import bisect

N,Q=map(int,input().split())
S=input().strip()
S=[ord(s)-65 for s in S]
M=[input().split() for i in range(Q)]

MLIST=[[] for i in range(26)]

for i in range(Q):
    m,lr=M[i][0],M[i][1]
    MLIST[ord(m)-65].append(i)

dist=dict()
def distinct(PLACE,TURN):

    x=bisect.bisect_left(MLIST[S[PLACE]],TURN)

    if x==len(MLIST[S[PLACE]]):
        dist[(PLACE,TURN)]=0
        return 1

    TURN=MLIST[S[PLACE]][x]

    if dist.get((PLACE,TURN))!=None:
        return dist.get((PLACE,TURN))
    
    if PLACE==0 and M[TURN][1]=="L":
        dist[(PLACE,TURN)]=0
        return 0
    
    if PLACE==N-1 and M[TURN][1]=="R":
        dist[(PLACE,TURN)]=0
        return 0

    if M[TURN][1]=="L":
        return distinct(PLACE-1,TURN+1)

    if M[TURN][1]=="R":
        return distinct(PLACE+1,TURN+1)

ANS=0
for i in range(N):
    ANS+=distinct(i,0)

print(ANS)

### FIXED CODE ###

import sys
input = sys.stdin.readline

N,Q=map(int,input().split())
S=input().strip()
M=[input().split() for i in range(Q)]

PLACE=-1

for i in range(Q-1,-1,-1):

    if PLACE+1<N and M[i][0]==S[PLACE+1] and M[i][1]=="L":
        PLACE+=1

    elif PLACE>=0 and M[i][0]==S[PLACE] and M[i][1]=="R":
        PLACE-=1

    if PLACE==N:
        print(0)
        sys.exit()

PLACE2=N

for i in range(Q-1,-1,-1):

    if PLACE2-1>=0 and M[i][0]==S[PLACE2-1] and M[i][1]=="R":
        PLACE2-=1

    elif PLACE2<=N-1 and M[i][0]==S[PLACE2] and M[i][1]=="L":
        PLACE2+=1

    if PLACE==-1:
        print(0)
        sys.exit()

print(max(0,N-(PLACE+1+(N-PLACE2))))
import math

N = int(input())

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

for i in range(1, N):
    b[i] = b[i-1] + a[i]
    
b.sort()
c = 1
ans = 0

def P(n, r):
    return math.factorial(n)//math.factorial(n-r)   

def C(n, r):
    return P(n, r)//math.factorial(r)

for i in range(1, N):
    if b[i]==b[i-1]:
        c = c+1
    else:
        if c>1:
            ans = ans + C(c, 2)
        if b[i-1]==0:
            ans = ans + c
        c=1
else:
    if c>1:
        ans = ans + C(c, 2)
    if b[i-1]==0:
        ans = ans + c
        
print(ans)

### FIXED CODE ###

import math

N = int(input())

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

for i in range(1, N):
    b[i] = b[i-1] + a[i]
    
b.sort()
c = 1
ans = 0

def P(n, r):
    return math.factorial(n)//math.factorial(n-r)   

def C(n, r):
    return P(n, r)//math.factorial(r)

if N==1:
    if b[0]==0:
        print(1)
    else:
        print(0)
else:
    for i in range(1, N):
        if b[i]==b[i-1]:
            c = c+1
        else:
            if c>1:
                ans = ans + C(c, 2)
            if b[i-1]==0:
                ans = ans + c
            c=1
    else:
        if c>1:
            ans = ans + C(c, 2)
        if b[i-1]==0:
            ans = ans + c
    
    print(ans)
def 解():
    iA,iB,iC,iD,iE,iF = [int(_) for _ in input().split()]
    #とりあえず全検索
    d = {}
    iMaxA = iF // 100*iA
    for i in range(iMaxA+1):
        iMaxB = (iF - 100*iA*i) // iB
        for j in range(iMaxB + 1):
            if i==0 and j==0:
                continue
            iAB = 100*iA*i + 100*iB*j
            iUlim = iAB * iE // 100
            if iAB + iUlim > iF :
                continue
            iMaxC = iUlim //iC
            for k in range(iMaxC+1):
                l = (iUlim - iC*k ) //iD
                iCD = iC*k +iD*l
                #if iCD > iF-iAB:
                #   continue
                if iUlim -iCD == 0:
                    print(iAB +iCD,iCD)
                    exit()
                else:
                    iKey = iUlim-iCD
                    if not iKey in d:
                        d[iKey] = (iAB +iCD,iCD)
    iMin = min(d.keys())
    print(" ".join(map(str,d[iMin])))
解()


### FIXED CODE ###


def 解():
    iA,iB,iC,iD,iE,iF = [int(_) for _ in input().split()]
    #結局全検索
    d = {}
    def searchAll(d,bF): # bF=0 Eにちかづける
        iMaxA = iF // 100*iA
        for i in range(iMaxA+1):
            iMaxB = (iF - 100*iA*i) // iB
            for j in range(iMaxB + 1):
                if i==0 and j==0:
                    continue
                iAB = 100*iA*i + 100*iB*j
                iUlim = iAB * iE //100
                if bF:
                    iUlim = min(iUlim,iF-iAB)
                else:
                    if iUlim > iF - iAB:
                        continue
                iMaxC = iUlim //iC
                for k in range(iMaxC+1):
                    l = (iUlim - iC*k ) //iD
                    iCD = iC*k +iD*l
                    if iUlim -iCD == 0:
                        print(iAB +iCD,iCD)
                        exit()
                    else:
                        iKey = iUlim-iCD
                        if not iKey in d:
                            d[iKey] = (iAB +iCD,iCD)
        return d
    d = searchAll(d,0)
    if not d:
        d = searchAll(d,1)
    iMin = min(d.keys())
    print(" ".join(map(str,d[iMin])))

解()
def main():
    import math
    n,k = map(int,input().split())
    a = list(map(int,input().split()))
    def f(a,l):
        ans = 0
        for i in range(len(a)):
            ans += math.ceil(a[i]/l)-1
        return ans
    l,r = 1,max(a)
    while r-l>1:
        if f(a,(l+r)//2)>k:
            l = (l+r)//2
        else:
            r = (l+r)//2
    while True:
        if f(a,r)<=k:
            r -= 1
        else:
            print(r+1)
            return

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    import math
    n,k = map(int,input().split())
    a = list(map(int,input().split()))
    def f(a,l):
        ans = 0
        for i in range(len(a)):
            ans += math.ceil(a[i]/l)-1
        return ans
    l,r = 1,max(a)
    while r-l>1:
        mid = (l+r)//2
        g = f(a,mid)
        if g>k:
            l = mid+1
        else:
            r = mid
    if f(a,l)<=k:
        print(l)
    else:
        print(r)

if __name__ == "__main__":
    main()
n = int(input())
a = [0,0,0,0]
for i in range(n):
  if input()=="AC":
    a[0] += 1
  elif input()=="WA":
    a[1] += 1
  elif input()=="TLE":
    a[2] += 1
  else:
    a[3] += 1
print("AC x ",end="")
print(a[0])
print("WA x ",end="")
print(a[1])
print("TLE x ",end="")
print(a[2])
print("RE x ",end="")
print(a[3])

### FIXED CODE ###

n = int(input())
a = [0,0,0,0]
for i in range(n):
  s = input()
  if s=="AC":
    a[0] += 1
  elif s=="WA":
    a[1] += 1
  elif s=="TLE":
    a[2] += 1
  else:
    a[3] += 1
print("AC x ",end="")
print(a[0])
print("WA x ",end="")
print(a[1])
print("TLE x ",end="")
print(a[2])
print("RE x ",end="")
print(a[3])
print(max(max(a,b)-1,min(a,b))+e)


### FIXED CODE ###

a, b = map(int, input().split())
coin = 0
for i in range(2):
    if a > b:
        coin += a
        a -= 1
    else:
        coin += b
        b -= 1

print(coin)
p = 0
a,b,c = map(int,input().split())
for (int x = a; x <= b; x++):
    if c%x=0:
        p += 1
    else:
        p=p
print(p)


### FIXED CODE ###

a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    if c%i == 0:
        count += 1


print(count)
import sys
sys.setrecursionlimit(1000000000)

def comb(n,k):
    if n==k or k==0:
        return 1
    elif lis[n][k]>0:
        return lis[n][k]
    else:
        lis[n][k]=comb(n-1,k)+comb(n-1,k-1)%1000000007
        return lis[n][k]
    
    

def divide(k,i):
    return comb(k-1,i-1)
n,k = map(int,input().split())
lis = [[0]*i for i in range(1,n+1)]

for i in range(1,k+1):
    print(divide(k,i)*comb(n-k+1,i)%1000000007)

### FIXED CODE ###

import sys
sys.setrecursionlimit(2000000)

def comb(n,k):
    if n==k or k==0:
        return 1
    elif lis[n][k]>0:
        return lis[n][k]
    else:
        lis[n][k]=comb(n-1,k)+comb(n-1,k-1)%1000000007
        return lis[n][k]
    
    

def divide(k,i):
    return comb(k-1,i-1)
n,k = map(int,input().split())
lis = [[0]*i for i in range(1,n+1)]

for i in range(1,k+1):
    if i-1 <= n-k:
        print(divide(k,i)*comb(n-k+1,i)%1000000007)
    else:
        print(0)
N=int(input())
S=[]
for i in range(N):
    if input() not in S:
        S.append(input())
print(len(S))

### FIXED CODE ###

N=int(input())
S=[]
for i in range(N):
    a=input()
    S.append(a)
b=list(set(S))
print(len(b))