#include <bits/stdc++.h>
using namespace std;
long long n, x, y, k, mx, my, mix, miy, i;
int main() {
  cin >> n;
  cin >> x >> y;
  mx = x;
  my = y;
  mix = x;
  miy = y;
  for (i = 2; i <= n; i++) {
    cin >> x >> y;
    mx = max(x, mx);
    my = max(y, my);
    mix = min(x, mix);
    miy = min(y, miy);
  }
  k = max(my - miy, mx - mix);
  cout << k * k << endl;
  return 0;
}
