#include using namespace std; int main() { int N; cin >> N; vector X(N), Y(N); for (int i = 0; i < N; i++){ int x, y; cin >> x >> y; X[i] = x + y; Y[i] = x - y; } sort(X.begin(), X.end()); sort(Y.begin(), Y.end()); int ans = 1e9; for (int i = 0; i < N; i++){ int m = 1e9, M = 0; M = max(M, abs(X[i] - X[0])); M = max(M, abs(X[i] - X[N - 1])); if (i != 0){ m = min(m, abs(X[i] - X[i - 1])); } if (i != N - 1){ m = min(m, abs(X[i] - X[i + 1])); } ans = min(ans, M - m); } for (int i = 0; i < N; i++){ int m = 1e9, M = 0; M = max(M, abs(Y[i] - Y[0])); M = max(M, abs(Y[i] - Y[N - 1])); if (i != 0){ m = min(m, abs(Y[i] - Y[i - 1])); } if (i != N - 1){ m = min(m, abs(Y[i] - Y[i + 1])); } ans = min(ans, M - m); } cout << ans << '\n'; }