import sys input = sys.stdin.readline N = int(input()) A, B = [0] * N, [0] * N for i in range(N): A[i], B[i] = map(int, input().split()) def f(x): ma = mi = A[0] + B[0] * x for i in range(1, N): ma = max(ma, A[i] + B[i] * x) mi = min(mi, A[i] + B[i] * x) return ma - mi def df(x): return f(x+1) - f(x) >= 0 if df(1): print(1) exit() no = 1 yes = 10 ** 18 while yes - no != 1: mid = (yes + no)//2 if df(mid): yes = mid else: no = mid print(yes)