#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  double d = 0;
  cin >> n;
  long long *x = new long long[n];
  long long *y = new long long[n];
  for (i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  sort(x, x + n);
  sort(y, y + n);
  long long s = max(x[n - 1] - x[0], y[n - 1] - y[0]);
  cout << fixed << s * s;
  return 0;
}
