N=int(input()) LR=[] for _ in range(N): a,b=map(int,input().split()) LR.append((a,b-a)) MAX=1<