import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): import bisect N=I() A=LI() B=LI() A,B = zip(*sorted(zip(A, B))) def calc(x): temp=0 for i in range(N): temp+=B[i]*abs(x-A[i]) return temp SB=sum(B) num=(SB+1)//2 cnt=0 i=-1 while cnt