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