#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define endl '\n' #define ALL(a) (a).begin(),(a).end() #define SZ(a) int((a).size()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define DEBUG(x) cout<<#x<<": "< P; typedef long long int LL; typedef pair LP; const int INF = INT_MAX; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; vector a(N); vector b(N); REP(i,N) cin >> a[i] >> b[i]; P ans=P(INF,INF); REP(i,N){ REP(j,i){ int x; P tm; if(b[i] - b[j] == 0){ x = 1; tm = P(abs(a[i]-a[j]),x); }else{ x = round((double)(a[j] - a[i])/(b[i] - b[j])); tm = P(abs(a[i]-a[j]+(b[i]-b[j])*x),x); } ans = min(tm, ans); } } cout << ans.second << endl; return 0; }