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