#include using namespace std; typedef long long ll; int n; vector a,b; ll f(ll x){ ll ma=a[0] + b[0]*x,mi = a[0] + b[0]*x; for(int j=1;j> n; a.resize(n);b.resize(n); for(int i=0;i> a[i] >> b[i]; } ll left = 1,right = 1e9; for(int i=0;i<1000;i++){ ll l = (2*left + right) / 3; ll r = (left + 2*right) / 3; if(f(l) < f(r)){ left = l; }else{ right = r; } } cout << (left+right)/2 << endl;; return 0; }