#include using namespace std; using ll = long long; using pll = pair; #define rep(i, j) for(int i=0; i < (int)(j); i++) #define repeat(i, j, k) for(int i = (j); i < (int)(k); i++) #define all(v) v.begin(),v.end() #define debug(x) cerr << #x << " : " << x << endl template bool set_min(T &a, const T &b) { return a > b ? a = b, true : false; } template bool set_max(T &a, const T &b) { return a < b ? a = b, true : false; } // vector template istream& operator >> (istream &is , vector &v) { for(T &a : v) is >> a; return is; } template ostream& operator << (ostream &os , const vector &v) { for(const T &t : v) os << "\t" << t; return os << endl; } // pair template ostream& operator << (ostream &os , const pair &v) { return os << "<" << v.first << ", " << v.second << ">"; } const int INF = 1 << 30; const ll INFL = 1LL << 60; class Solver { public: bool solve() { int N; cin >> N; vector A(N); for(auto &a : A) cin >> a.first >> a.second; auto calc = [&](ll t) { ll mx = -1, mn = 2 * 1e9; for(pll &a : A) { set_min(mn, a.first + a.second * t); set_max(mx, a.first + a.second * t); } cerr << t << " " << mx - mn << endl; return mx - mn; }; ll l = 0, r = 2 + 1e9 + 1; while(l + 1 < r) { ll a = (l + r) / 2; if(calc(a) > calc(a + 1)) l = a; else r = a; } cout << r << endl; return 0; } }; int main() { cin.tie(0); ios::sync_with_stdio(false); Solver s; s.solve(); return 0; }