#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, Mx = -1E15, My = -1E15, mx = 1E15, my = 1E15;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    Mx = max(Mx, x);
    My = max(My, y);
    mx = min(mx, x);
    my = min(my, y);
  }
  long long ans = max((Mx - mx), (My - my));
  cout << ans * ans;
}
