N=int(raw_input()) ab=[map(int,raw_input().split()) for i in range(N)] ab.sort() minval=1000000001 ans=1000000001 for i in range(N): for j in range(i+1,N): ai,bi=ab[i][0],ab[i][1] aj,bj=ab[j][0],ab[j][1] ind=1 if bi!=bj: ind=max(1,(aj-ai)/(bi-bj)) #print aj,"+",ind,"*",bj,"-",ai,"+",ind,"*",bi if abs((aj+ind*bj)-(ai+ind*bi))<=minval: if abs((aj+ind*bj)-(ai+ind*bi))==minval: ans=min(ans,ind) else: ans=ind minval=abs((aj+ind*bj)-(ai+ind*bi)) ind+=1 #print aj,"+",ind,"*",bj,"-",ai,"+",ind,"*",bi if abs((aj+ind*bj)-(ai+ind*bi))<=minval: if abs((aj+ind*bj)-(ai+ind*bi))==minval: ans=min(ans,ind) else: ans=ind minval=abs((aj+ind*bj)-(ai+ind*bi)) print ans