#include <bits/stdc++.h>
using namespace std;
long long int ar1[1005];
long long int ar2[1005];
int main() {
  int n;
  long long int res;
  cin >> n;
  long long int a, b, c, d;
  for (int i = 0; i < n; i++) {
    cin >> ar1[i] >> ar2[i];
  }
  sort(ar1, ar1 + n);
  sort(ar2, ar2 + n);
  if ((ar1[n - 1] - ar1[0]) >= (ar2[n - 1] - ar2[0])) {
    res = (ar1[n - 1] - ar1[0]) * (ar1[n - 1] - ar1[0]);
    cout << res << endl;
  } else {
    res = (ar2[n - 1] - ar2[0]) * (ar2[n - 1] - ar2[0]);
    cout << res << endl;
  }
  return 0;
}
