#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[n + 1], b[n + 1];
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> b[i];
  }
  sort(a, a + n);
  sort(b, b + n);
  long long mx_x = a[n - 1];
  long long mn_x = a[0];
  long long mx_y = b[n - 1];
  long long mn_y = b[0];
  long long x = (mx_x - mn_x);
  long long y = (mx_y - mn_y);
  long long r = max(x, y);
  r = r * r;
  cout << r << endl;
}
