#include <bits/stdc++.h>
using namespace std;
int main() {
  long long res, x[10004], y[10004], maX = -1000000009, maY = -1000000009,
                                     miX = 1000000009, miY = 1000000009;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    maX = max(maX, x[i]);
    miX = min(miX, x[i]);
    maY = max(maY, y[i]);
    miY = min(miY, y[i]);
  }
  res = max(maX - miX, maY - miY);
  res *= res;
  cout << res;
}
