inputer = int(input()) for inter in range(inputer): x,y =map(int,input().split(" ")) if inter>0: if not(tmp==(y-x)): result=-1 break else: if x