#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, maxx = -INT_MAX, minx = INT_MAX, miny = INT_MAX, maxy = -INT_MAX,
               x, y;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    minx = min(minx, x);
    miny = min(miny, y);
    maxx = max(maxx, x);
    maxy = max(maxy, y);
  }
  maxx = maxx - minx;
  maxy = maxy - miny;
  maxx = max(maxx, maxy);
  cout << maxx * maxx;
}
