#include <bits/stdc++.h>
using namespace std;
const int maxa = 100005;
int b[maxa];
int main() {
  int n;
  cin >> n;
  long long maxx, minx, maxy, miny;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    if (i == 0) {
      maxx = minx = x;
      maxy = miny = y;
    } else {
      maxx = max(maxx, x);
      minx = min(minx, x);
      maxy = max(maxy, y);
      miny = min(miny, y);
    }
  }
  unsigned long long maxn = max((maxx - minx), (maxy - miny));
  cout << maxn * maxn << endl;
}
