#include using namespace std; using ll = long long; int main(){ int n; cin >> n; vector> a(n); for(auto &&p:a)cin >> p.first >> p.second; auto dist1 = [&](int i, int j){ return abs(a[i].first + a[i].second - (a[j].first + a[j].second)); }; auto dist2 = [&](int i, int j){ return abs(a[i].first - a[i].second - (a[j].first - a[j].second)); }; vector pos1(n), pos2; iota(pos1.begin(), pos1.end(), 0); pos2 = pos1; sort(pos1.begin(), pos1.end(), [&](int i, int j){ return a[i].first + a[i].second < a[j].first + a[j].second; }); sort(pos2.begin(), pos2.end(), [&](int i, int j){ return a[i].first - a[i].second < a[j].first - a[j].second; }); vector c(n), d(n); for(int i = 0; i < n; i++){ c[i] = min(max(dist1(i, pos1[0]), dist2(i, pos2[0])), max(dist1(i, pos1[n - 1]), dist2(i, pos2[n - 1]))); d[i] = min(max(dist1(i, pos1[0]), dist2(i, pos2[n - 1])), max(dist1(i, pos1[n - 1]), dist2(i, pos2[0]))); } ll ans = *max_element(c.begin(), c.end()); ans = min(ans, *max_element(d.begin(), d.end())); cout << ans / 2 << '\n'; }