#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long maxx = -1e9 - 5;
  long long maxy = -1e9 - 5;
  long long minx = 1e9 + 5;
  long long miny = 1e9 + 5;
  for (int i = 0; i < n; i++) {
    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 maxq = (max(abs(maxx - minx), abs(maxy - miny)));
  cout << maxq * maxq;
  return 0;
}
