N = int(input()) x = [0] * N for i in range(N): a,b = (int(x) for x in input().split()) x[i] = b - a #print(x,len(set(x))) if a