from math import floor, ceil def func(x,tmpx,fx): l = [a + b*tmpx for a,b in ab] flx = max(l) - min(l) if flx < fx: return tmpx,flx else: return x,fx N = int(raw_input()) ab = [map(int,raw_input().split(" ")) for i in xrange(N)] x,fx = 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,fx = func(x,int(floor(tmpx)),fx) x,fx = func(x,int(ceil(tmpx)),fx) print x