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