#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, i = 0;
  long long int x2 = 0, y2 = 0;
  scanf("%d", &n);
  long long int x[n], y[n];
  for (i = 0; i < n; i++) cin >> x[i] >> y[i];
  sort(x, x + n);
  sort(y, y + n);
  x2 = x[n - 1] - x[0];
  y2 = y[n - 1] - y[0];
  if (x2 == 0) {
    y2 *= y2;
    cout << y2 << endl;
  } else if (y2 == 0) {
    x2 *= x2;
    cout << x2 << endl;
  } else {
    x2 = max(x2, y2);
    x2 *= x2;
    cout << x2 << endl;
  }
  return 0;
}
