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