#include <bits/stdc++.h>
using namespace std;
int main() {
  long long mxx, mxy, mnx, mny;
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    long long x, y;
    cin >> x >> y;
    if (i == 0) {
      mxx = mnx = x;
      mxy = mny = y;
      continue;
    }
    mxx = max(mxx, x);
    mxy = max(mxy, y);
    mnx = min(mnx, x);
    mny = min(mny, y);
  }
  long long ans = max((mxx - mnx), (mxy - mny));
  ans *= ans;
  cout << ans << endl;
  return 0;
}
