#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long a, b, c, d, x, y;
  a = -2e9;
  b = (2e9);
  c = -(2e9);
  d = (2e9);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    a = max(x, a);
    b = min(x, b);
    c = max(y, c);
    d = min(y, d);
  }
  a = (a - b);
  b = (c - d);
  c = max(a, b);
  cout << c * c << endl;
}
