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