#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[1111], b[1111];
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i] >> b[i];
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + n);
  long long q = abs(a[n] - a[1]);
  long long w = abs(b[n] - b[1]);
  if (q > w)
    cout << q * q;
  else
    cout << w * w;
  return 0;
}
