from math import floor, ceil def func(x,tmpx,fx): l = [a + b*tmpx for a,b in ab] f_tmpx = max(l) - min(l) if f_tmpx < fx or (f_tmpx == fx and tmpx < x): return tmpx,f_tmpx else: return x,fx N = int(raw_input()) ab = [map(int,raw_input().split(" ")) for i in xrange(N)] x,f_x = func(1,1,10**10) for i in xrange(N-1): for j in xrange(i+1,N): if ab[i][1] == ab[j][1]: continue tmpx = (ab[j][0] - ab[i][0])*(-1.) / (ab[j][1] - ab[i][1]) if tmpx < 1: continue x,f_x = func(x,int(floor(tmpx)),f_x) x,f_x = func(x,int(ceil(tmpx)),f_x) print x