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