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