n = int(input()) X = list(map(int,input().split())) Y = list(map(int,input().split())) ans = 10**20 for x,y in zip(X,Y): ans = min(ans,x+y) inf = 10**10 print(ans) print(inf) for x,y in zip(X,Y): cand = x if abs(ans-cand) > y: cand = ans-y print(cand+inf) print(ans+inf)