Harryxun/stf_run huggingface dataset:
for x in range(0,101):
    for y in range(0,101):
        h = -1
        for i in plist:
            diff = abs(i[0]-x) + abs(i[1]-y)
            if h == -1:
                h = diff + i[2]
            else:
                if h != diff + i[2]:
                    break
        else:
            print(x, y, h)

### FIXED CODE ###

n = int(input())
plist = [tuple(map(int, input().split())) for i in range(n)]
plist = sorted(plist, key = lambda x: -x[2])

for x in range(0,101):
    for y in range(0,101):
        h = -1
        for i in plist:
            diff = abs(i[0]-x) + abs(i[1]-y)
            if h == -1:
                h = diff + i[2]
            elif i[2] == 0:
                if h > diff:
                    break
            else:
                if h != diff + i[2]:
                    break
        else:
            if h <= 0:
                pass
            else:
                print("{} {} {}".format(x, y, h))
n = int(input())
restaurant = [input().split() for i in range(n)]
restaurant_sorted = sorted(restaurant)

for i in range(n):
    print(restaurant.index((restaurant_sorted[i]))

### FIXED CODE ###

N = int(input())

L = []

for i in range(N):
    s,p = input().split()
    L.append([s, 100-int(p), i+1])
L.sort()
for j in L:
    print(j[2])
import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 < s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
elif x**2 == s :
    ans = 90
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)


### FIXED CODE ###

import math
a,b,x = map(int,input().split())
s = a*a*b
if x*2 < s :
    ans = 90 - math.degrees(math.atan(2*x/(a*b*b)))
elif x == s :
    ans = 0
else :
    ans = 90 - math.degrees(math.atan(a**3/(s-x)/2))
print(ans)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

x,y=MI()
if x+y>=10:
    print("error")
else:
    print(a+b)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

x,y=MI()
if x+y>=10:
    print("error")
else:
    print(x+y)
a, b, c = map(int, input().split())

print(min([a + b, a + c, b + c])

### FIXED CODE ###

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

print(min([a + b, a + c, b + c]))
def main():
    H, W, M = map(int, input().split())
    bombs = [list(map(int, input().split())) for i in range(M)]
    
    if M == 1:
        return 1
    
    hw = [0] * H
    wh = [0] * W
    
    for i in range(len(bombs)):
        [h, w] = bombs[i]
        hw[h] += 1
        wh[w] += 1
    
    hw_tuple_list = []
    for i in range(len(hw)):
        hw_tuple_list.append((sum(hw[i]), i+1))
    
    wh_tuple_list = []
    for i in range(len(wh)):
        wh_tuple_list.append((sum(wh[i]), i+1))

    h_list = sorted(hw_tuple_list, reverse = True)
    w_list = sorted(wh_tuple_list, reverse = True)

    h_max = h_list[0][0]
    h_idx_list = []
    for i in range(len(h_list)):
        if h_max > h_list[i][0]:
            break
        h_idx_list.append(h_list[i][1])

    w_max = w_list[0][0]
    w_idx_list = []
    for i in range(len(w_list)):
        if w_max > w_list[i][0]:
            break
        w_idx_list.append(w_list[i][1])
    
    cnt = 1
    for i in range(len(h_idx_list)):
        for j in range(len(w_idx_list)):
            if hw[h_idx_list[i] - 1][w_idx_list[j] - 1] != 1:
                cnt = 0
                break
    return w_max + h_max - cnt

if __name__ == '__main__':
    print(main())

### FIXED CODE ###

def main():
    H, W, M = map(int, input().split())
    bombs = [list(map(int, input().split())) for i in range(M)]
    
    if M == 1:
        return 1
    
    hw = [0] * H
    wh = [0] * W
    
    for i in range(len(bombs)):
        [h, w] = bombs[i]
        hw[h-1] += 1
        wh[w-1] += 1
    
    hw_tuple_list = []
    for i in range(len(hw)):
        hw_tuple_list.append((hw[i], i+1))
    
    wh_tuple_list = []
    for i in range(len(wh)):
        wh_tuple_list.append((wh[i], i+1))

    h_list = sorted(hw_tuple_list, reverse = True)
    w_list = sorted(wh_tuple_list, reverse = True)

    h_max = h_list[0][0]
    h_idx_list = []
    check_h = [0] * H
    for i in range(len(h_list)):
        if h_max > h_list[i][0]:
            break
        h_idx_list.append(h_list[i][1])
        check_h[h_list[i][1]-1] = 1

    w_max = w_list[0][0]
    w_idx_list = []
    check_w = [0] * W
    for i in range(len(w_list)):
        if w_max > w_list[i][0]:
            break
        w_idx_list.append(w_list[i][1])
        check_w[w_list[i][1]-1] = 1
    
    cnt = 0
    for [h, w] in bombs:
        if check_h[h-1] == 1 and check_w[w-1] == 1:
            cnt += 1
    return h_max + w_max if cnt != len(h_idx_list) * len(w_idx_list) else h_max + w_max - 1

if __name__ == '__main__':
    print(main())
n,m = map(int,input().split())
AB = []
ans = [-1] * (n) #####

edge = [[] for _ in range(n)] #edge[i] := 頂点iから伸びてる辺の行き先のリスト #####

for i in range(m):
    a,b = map(int,input().split())
    edge[a].append(b)    
    edge[b].append(a)    
    
import collections
que = collections.deque()
que.append(0) #####
    
while que:
    x = que.popleft()
    
    for to in edge[x]:
        a = x
        b = to
        
        if ans[b] == -1: #####
            ans[b] = x + 1 #####
            que.append(b)
            
print("Yes")
print(*ans,sep="\n")


### FIXED CODE ###

#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,M=MI()
    edge = [[] for _ in range(N)]
    for i in range(M):
        a,b = MI_()
        edge[a].append(b)
        edge[b].append(a)
    queue = deque([0])
    dist = [inf]*N
    dist[0] = 0
    ans = [-1]*N
    while(queue):
        v = queue.popleft()
        for to in edge[v]:
            if(dist[to]==inf):
                ans[to] = v+1
                queue.append(to)
                dist[to] = dist[v] + 1

    print("Yes")
    print(*ans[1:],sep="\n")

    
if __name__ == '__main__':
    main()
import itertools
from bisect import bisect_left,bisect
import sys

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

A_max=max(A)
lst=[[] for i in range(A_max+1)]
flag=[0]*(A_max+1)
for i in range(n):
    lst[A[i]].append(i)

flag=[0]*n
data=[]
i=0
while flag[i]==0:
    flag[i]=1
    a=A[i]
    b=bisect(lst[a],i)
    if b==len(lst[a]):
        data.append(i)
        i=lst[a][0]+1
    else:
        i=lst[a][b]+1
    if i==n:
        data.append(n)
        i=0

if not data:
    print()
    sys.exit()
s=len(data)
zzz=data[(K-1)%s]
i=zzz
d=[]
while i<n:
    a=A[i]
    b=bisect(lst[a],i)
    if b<len(lst[a]):
        d.append([i,lst[a][b]])
        i=lst[a][b]+1
        continue
    else:
        i+=1

if d:
    ans=A[zzz:d[0][0]]
    for j in range(len(d)-1):
        ans=itertools.chain(ans,A[d[i][1]+1:d[i+1][0]])
    ans=itertools.chain(ans,A[d[-1][1]+1:])
    print(*ans)
else:
    print(*A[zzz:])

### FIXED CODE ###

import itertools
from bisect import bisect_left,bisect
import sys

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

A_max=max(A)
lst=[[] for i in range(A_max+1)]
flag=[0]*(A_max+1)
for i in range(n):
    lst[A[i]].append(i)

flag=[0]*n
data=[]
i=0
while flag[i]==0:
    flag[i]=1
    a=A[i]
    b=bisect(lst[a],i)
    if b==len(lst[a]):
        data.append(i)
        i=lst[a][0]+1
    else:
        i=lst[a][b]+1
    if i==n:
        data.append(n)
        i=0

#大丈夫
if not data:
    print()
    sys.exit()
s=len(data)
zzz=data[(K-1)%s]
i=zzz
d=[]
while i<n:
    a=A[i]
    b=bisect(lst[a],i)
    if b<len(lst[a]):
        d.append([i,lst[a][b]])
        i=lst[a][b]+1
        continue
    else:
        i+=1


if d:
    ans=A[zzz:d[0][0]]
    for j in range(len(d)-1):
        ans=list(itertools.chain(ans,A[d[j][1]+1:d[j+1][0]]))
    ans=list(itertools.chain(ans,A[d[-1][1]+1:]))
    print(*ans)
else:
    print(*A[zzz:])
s = raw_input().split(' ')
n, m = int(s[0]), int(s[1])
nums = []
for _ in range(n):
    num = input()
    nums.append(num)
if n == 0:
    print('0')
    exit()
total = [0 for _ in range(n)]
total[0] = nums[0]
for i in range(1, n):
    total[i] = total[i-1] + nums[i]
cnt = 0
for i in range(0, n):
    for j in range(i+1, n):
        if (total[j]-total[i]) % m == 0:
            cnt += 1
print cnt

### FIXED CODE ###

s = raw_input().split(' ')
n, k = int(s[0]), int(s[1])
if n % k == 0:
    print('0')
else:
    print('1')
from bisect import bisect_left

n = input()
ls = list(map(int, input().split())).sort
count = 0
for i in range(n - 2):
  for j in range(i + 1, n - 1):
    two_sides_sum = ls[i]+ ls[j]
    bi = bisect_left(ls, two_sides_sum)
    count += bi - j - 1
print(count)

### FIXED CODE ###

import bisect
n = int(input())

li = list(map(int, input().split()))
li.sort()

count = 0

for i in range(n - 2):
  for j in range(i + 1, n - 1):
    bi = bisect.bisect_left(li, li[i] + li[j])
    count += bi - j - 1
print(count)
s = str(input())
 

 for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break
 
 for i in reversed(range(len(s))):
    if s[i] == 'Z':
        z = i
        break
 

 print(z - a + 1)

### FIXED CODE ###

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

# input
s = input()

# solve
for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break

for i in reversed(range(len(s))):
    if s[i] == 'Z':
        z = i
        break

# output
print(z - a + 1)
while True:
    C -= B
    if C <= 0:
        print("Yes")
        break
    A -= D
    if D <= 0:
        print("No")
        break

### FIXED CODE ###

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

while True:
    C -= B
    #print(C)
    if C <= 0:
        print("Yes")
        break
    A -= D
    #print(A)
    if A <= 0:
        print("No")
        break
n=int(input())

def CanReach(t,x,y,now_t,now_x,now_y):
    if now_x<0 or now_y<0 or now_x>10^5 or now_y>10^5:
        return False

    if t==now_t:
        if x==now_x and y==now_y:
            return True
        else:
            return False

    if CanReach(t,x,y,now_t+1,now_x+1,now_y) or \
       CanReach(t,x,y,now_t+1,now_x-1,now_y) or \
       CanReach(t,x,y,now_t+1,now_x,now_y+1) or \
       CanReach(t,x,y,now_t+1,now_x,now_y-1):
        return True
    return False

now_t,last_x,last_y=0,0,0
for _ in range(n):
    ti,xi,yi=map(int,input().split())
    if CanReach(ti,xi,yi,now_t,last_x,last_y)==False:
        print('No')
        exit()
    now_t,last_x,last_y=ti,xi,yi
print('Yes')

### FIXED CODE ###

n=int(input())
tn,xn,yn=0,0,0
for _ in range(n):
    ti,xi,yi=map(int,input().split())
    td,xd,yd=ti-tn,xi-xn,yi-yn
    if td<xd+yd or (td+xd+yd)%2!=0:
        print('No')
        exit()
    tn,xn,yn=ti,xi,yi
print('Yes')
import sys
from collections import defaultdict
input = sys.stdin.readline

H, W = map(int, input().split())
M = (H + W) * 100

A = [tuple(map(int, input().split())) for _ in range(H)]
B = [tuple(map(int, input().split())) for _ in range(H)]

dp = [[0] * W for _ in range(H)]
dp[0][0] |= (1 << (M - abs(A[0][0] - B[0][0])))

for h in range(H):
    for w, (a, b) in enumerate(zip(A[h], B[h])):
        d = abs(a - b)
        if d == 0:
            continue
        mask = 0
        if h > 0:
            mask |= (dp[h - 1][w] << d)
            mask |= (dp[h - 1][w] >> d)
        if w > 0:
            mask |= (dp[h][w - 1] << d)
            mask |= (dp[h][w - 1] >> d)
        dp[h][w] = mask

state = dp[-1][-1]
nums = []
for digit, b in enumerate(bin(state)[2:][:: -1]):
    if b == '1':
        nums.append(M - digit)
ans = min(abs(n) for n in nums)
print(ans)


### FIXED CODE ###

H, W = map(int, input().split())
M = (H + W) * 80

A = [tuple(map(int, input().split())) for _ in range(H)]
B = [tuple(map(int, input().split())) for _ in range(H)]

dp = [[0] * W for _ in range(H)]
dp[0][0] = (1 << (M - abs(A[0][0] - B[0][0])))

for h in range(H):
    for w, (a, b) in enumerate(zip(A[h], B[h])):
        d = abs(a - b)
        mask = 0
        if h > 0:
            mask |= (dp[h - 1][w] << d)
            mask |= (dp[h - 1][w] >> d)
        if w > 0:
            mask |= (dp[h][w - 1] << d)
            mask |= (dp[h][w - 1] >> d)
        dp[h][w] |= mask

state = dp[-1][-1]
nums = []
for digit, b in enumerate(bin(state)[2:][:: -1]):
    if b == '1':
        nums.append(digit - M)
ans = min(abs(n) for n in nums)
print(ans)
a,b=map(int,input().split())
d=a%b
r=a%b-d
f=flort(r)
print("{} {} {}".format())

### FIXED CODE ###

a,b=map(int,input().split())
d=a//b
r=a%b
f=float(a/b)
print('{0} {1} {2:0.5f}'.format(d, r, f))
a,b=map(int,input().split())
if a==b:
  print("H")
else:
  print("D")

### FIXED CODE ###

a,b=input().split()
if a==b:
  print("H")
else:
  print("D")
n=int(input())
if n[0]==9 or n[1]==9:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n=input()
if n[0]=="9" or n[1]=="9":
  print("Yes")
else:
  print("No")
n=int(input())
a=list(map(int,input().split()))
cnt=0
n=[]
for i in range(len(a)):
  for j in range(i+1,len(a)):
    if n[i-1]==0:
      continue
    elif sum(a[i:j])==0:
      cnt+=1
print(cnt)

### FIXED CODE ###

from collections import Counter
n=int(input())
a = [int(i) for i in input().split()]
b=[0]
s=0
for i in a:
  s+=i
  b.append(s)
c= Counter(b)
ans=0
for i in c:
  ans+=int(c[i]*(c[i]-1)/2)
print(ans)
#copy code
#D
from scipy.misc import comb
n,k=map(int,input().split())
mod=10**9+7
for i in range(1,k+1):
    print(int(comb(k-1,i-1,exact=True)*comb(n-k+1,i,exact=True))%mod)

### FIXED CODE ###

#D
from scipy.misc import comb
n,k=map(int,input().split())
mod=10**9+7
for i in range(1,k+1):
    print(int(comb(k-1,i-1,exact=True)*comb(n-k+1,i,exact=True))%mod)
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if a - b <= d and b - c <= d:
    print"Yes"
else:
    print"No"


### FIXED CODE ###

a = input().split()
if (abs(int(a[0]) - int(a[1])) <= int(a[3]) and abs(int(a[1]) - int(a[2])) <= int(a[3])) or abs(int(a[0]) - int(a[2])) <= int(a[3]):
    print("Yes")
else:
    print("No")
N,M=map(int,input().split())
tbl=[[0]*(N+1) for _ in range(N+1)]
for i in range(M):
  a,b=map(int,input().split())
  tbl[a][b]=1
  tbl[b][a]=1            # グラフの行列を用いた表現
def dfs(s,visited):
  if len(visited)==N:
    return 1
  
  ans=0
  for i in range(1,N+1):
    if i==s: continue     #自己閉路は関係ない。
    if tbl[s][i]==1 and (i not in visited):
      visited.append(i)
      ans+=dfs(i,visited)
      visited.pop()　　　　　#dfsを考えているからiをpopする。
  return ans 

answer=dfs(1,[1,])
print(answer)
      

### FIXED CODE ###

N,M=map(int,input().split())
tbl=[[0]*(N+1) for _ in range(N+1)]
for i in range(M):
  a,b=map(int,input().split())
  tbl[a][b]=1
  tbl[b][a]=1            # グラフの行列を用いた表現
def dfs(s,visited):
  if len(visited)==N:
    return 1
  
  ans=0
  for i in range(1,N+1):
    if i==s: continue
    if tbl[s][i]==1 and (i not in visited):
      visited.append(i)
      ans+=dfs(i,visited)
      visited.pop()
  return ans 

answer=dfs(1,[1,])
print(answer)
N, M = map(int, input().split())
x = sorted([int(x) for x in input().split()])

diff = sorted([i - j for i, j in zip(x[1:], x[:-1])], reverse=True)
diff0 = diff[:N-1]
diff1 = set(diff[:N-1])


if N >= M:
    print(0)
elif N == 1:
    print(max(x)-min(x))
else:
    j = 0
    ans = 0
    for i in range(M-1):
        a = x[i+1] - x[i]
        if a in diff1 and len(diff0) != 0:
            if i - j >= 1:
                ans += x[i] - x[j]
            diff0.remove(a)
            j = i+1
            if len(diff0) == 0:
                ans += x[-1] - x[i+1]
                break
    print(ans)
    



### FIXED CODE ###

import sys

N, M = map(int, input().split())
x = sorted(map(int, input().split()))

if N >= M:
    print(0)
    sys.exit()
diff = [0]*(M-1)
for i in range(M-1):
    diff[i] = x[i+1] - x[i]
diff.sort()
ans = sum(diff[:M-N])
print(ans)
n=int(input())
a=[[]for i in range(n+1)]
for i in range(n-1):
    c,d=map(int,input().split())
    a[c].append([d,i])
c=[0]*(n-1)
def f(x,y):
    r=1
    for i in a[x]:
        if r==y:
            r+=1
        c[i[1]]=r
        f(i[0],r)
        r+=1
f(1,0)
print(max(c))
for i in c:
    print(i)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
n=int(input())
s=[[]for i in range(n+1)]
t=[0]*(n-1)
for i in range(n-1):
    a,b=map(int,input().split())
    s[a-1].append([b-1,i])
def f(x,r):
    c=1
    for (i,j) in s[x]:
        if c==r:
            c+=1
        t[j]=c
        f(i,c)
        c+=1
f(0,0)
print(max(t))
for i in t:
    print(i)
import math
def fact(n):
    ans = 1
    for i in range(2, n+1):
        ans*= i
    return ans
def comb(n, c):
    return fact(n)//(fact(n-c)*c)
n,m,q = map(int, input().split())
lis = [1 for i in range(n)]
ords = []
cost = []
dp = [-1 for i in range(200)]
ans = 0
for i in range(q):
    o = list(map(int, input().split()))
    ords.append(o[:n])
    cost.append(o[-1])
def checker(p, arr, ans):
    if(dp[p] == ans):
        return dp[p]
    for i in range(n-p-1, -1, -1):
        for c in range(m):
            arr[p] = c
            temp = 0
            ans = checker(p+1, arr, ans)
            for i in range(q):
                if(arr[ords[i][1]-1]-arr[ords[i][0]-1]==ords[i][2]):
                    temp+=cost[i]
            if(temp > ans):
                ans = temp
            dp[p] = ans
    return ans
print(checker(0, lis, 0))


### FIXED CODE ###

N,M,Q=map(int,input().split())
L = []
for i in range(Q):
  L.append(list(map(int, input().split())))
  L[i][0]-=1
  L[i][1]-=1
 
import itertools
l =list(range(1,M+1))
v=list(itertools.combinations_with_replacement(l,N))
ans=0
for arr in v:
  score=0
  for a,b,c,d in L:
    if (arr[b] - arr[a])==c:      
      score+=d
  ans=max(ans,score)
print(ans)
S = str(input())

zero_num = 0
one_num = 

for i in range(len(S)):
    if S[i] == "0":
        zero_num += 1

print(2*min(zero_num, len(S) - zero_num))

### FIXED CODE ###

S = str(input())

zero_num = 0
one_num = 0

for i in range(len(S)):
    if S[i] == "0":
        zero_num += 1
    else:
        one_num += 1

print(2*min(zero_num, one_num))
char = input().split(" ")
if int(char[0])*500 >= (char[1]):
    print("Yes")
else: 
    print("No")

### FIXED CODE ###

char = input().split(" ")
if int(char[0])*500 >= int(char[1]):
    print("Yes")
else: 
    print("No")
import sys

N,M = map(int,input().split())
member = dict()
for i in range(1,N+1,1):
    j=int(input())
    member[i] = set(int(input()) for _ in range(j))
if(N==1):
    print(member(1))
    sys.exit(0)

match_set=member[1]
for i in range(2,N+1,1):#memberに対し、1人ずつ検査していく
    match_set = match_set & member[i]

print(match_set.length)
        


### FIXED CODE ###

import sys

N,M = map(int,input().split())
member = dict()
for i in range(1,N+1,1):
    ilist = list(map(int,input().split()))
    ilist.pop(0)
    member[i]=set(ilist)

match_set=member[1]

for i in range(2,N+1,1):#memberに対し、1人ずつ検査していく
    match_set = match_set & member[i]

print(len(match_set))
# -*- coding: utf-8 -*-

# input
S = input()
# S = "abcdefghijklmnopqrstuvwzyx"
# S = "atcoder"

s = list(S)
a = []
for i in range(len(s)):
    a.append(ord(s[i]))

t = [chr(i) for i in range(97, 97+26)]
b = [i for i in range(97, 97+26)]


# function
def func(s_):
    ss_ = []
    for i in range(len(s_)):
        ss_.append(chr(s_[i]))
    ss_ = ''.join(ss_)
    return ss_


# solve
if (len(s) < 26):
    for i in range(len(s)):
        b.remove(a[i])
    a.append(min(b))
    print(func(a))

if (len(s) == 26):
    for i in reversed(range(len(s))):
        if (a[i] < a[i-1]):
            if (i == 1):
                print(-1)
                break
            else:
                continue
        else:
            c = a[0:i]
            d = a[i:len(a)]
            # a[i-1]よりも大きくて最も小さいものを探す
            d.pop()
            d.append(min(d))
            print(func(d))


### FIXED CODE ###

# -*- coding: utf-8 -*-
import bisect

# input
S = input()
# S = "abcdefghijklmnopqrstuvwzyx"
# S = "atcoder"
# S = "qpwoeirutyalskdjfhgzmxnvcb"

s = list(S)
a = []
for i in range(len(s)):
    a.append(ord(s[i]))

t = [chr(i) for i in range(97, 97+26)]
b = [i for i in range(97, 97+26)]


# function
def func(s_):
    ss_ = []
    for i in range(len(s_)):
        ss_.append(chr(s_[i]))
    ss_ = ''.join(ss_)
    return ss_


# solve
if (len(s) < 26):
    for i in range(len(s)):
        b.remove(a[i])
    a.append(min(b))
    print(func(a))

if (len(s) == 26):
    for i in reversed(range(len(s))):
        if (a[i] < a[i-1]):
            if (i == 1):
                print(-1)
                break
            else:
                continue
        else:
            c = a[0:i]
            d = a[i:len(a)]
            d = sorted(d)
            # a[i-1]よりも大きくて最も小さいものを探す
            num = c.pop()
            ind = bisect.bisect_left(d, num)
            c.append(d[ind])
            print(func(c))
            break
S , T = map(str, input().split())
if T == S + T[-1]:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

S= input()
T= input()
if T == S + T[-1]:
  print('Yes')
else:
  print('No')
import math
N, K = map(int, input().split())
BCs = [b,a*b for a,b in zip(sorted(list(map(int, input().split()))), sorted(list(map(int, input().split())))[::-1])]

def f(target):
    return sum([math.ceil(max(0, c - target)/b)for b, c in BCs])<=K

if __name__ == '__main__':
    min_i, max_i, index = 0, 10**12, 1
    while True:
        if f(index):
            index, max_i = (index-1 + min_i)//2, index-1
        else:
            index, min_i = (index+1 + max_i)//2, index+1
        if min_i > max_i:
            print(min_i)
            break

### FIXED CODE ###

import math
N, K = map(int, input().split())
As = sorted(list(map(int, input().split())))
Bs = sorted(list(map(int, input().split())))[::-1]
Cs = [a*b for a, b in zip(As, Bs)]
BCs = list(zip(Bs, Cs))

def func(target):
    r = 0
    for b, c in BCs:
        r += math.ceil(max(0, c - target) / b)
    return r <= K

if __name__ == '__main__':
    min_i, max_i, index = 0, max(Cs)+1, 1
    while True:
        if func(index):
            index, max_i = (index-1 + min_i)//2, index-1
        else:
            index, min_i = (index+1 + max_i)//2, index+1
        if min_i > max_i:
            print(min_i)
            break