#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long arr[n], brr[n];
  long long mina = 1e+9, maxa = -1e+9, minb = 1e+9, maxb = -1e+9;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i] >> brr[i];
    if (arr[i] < mina) {
      mina = arr[i];
    }
    if (arr[i] > maxa) {
      maxa = arr[i];
    }
    if (brr[i] < minb) {
      minb = brr[i];
    }
    if (brr[i] > maxb) {
      maxb = brr[i];
    }
  }
  long long xdist = abs(maxa - mina);
  long long ydist = abs(maxb - minb);
  if (xdist > ydist) {
    cout << xdist * xdist;
  } else {
    cout << ydist * ydist;
  }
  return 0;
}
