#include <bits/stdc++.h>
using namespace std;
int x[1001], y[1001];
int main() {
  int n;
  long long xmax, xmin, ymax, ymin;
  cin >> n;
  cin >> x[0] >> y[0];
  xmax = xmin = x[0];
  ymax = ymin = y[0];
  for (int i = 1; i < n; i++) {
    cin >> x[i] >> y[i];
    if (x[i] > xmax) xmax = x[i];
    if (x[i] < xmin) xmin = x[i];
    if (y[i] > ymax) ymax = y[i];
    if (y[i] < ymin) ymin = y[i];
  }
  long long ans;
  if (xmax - xmin > ymax - ymin)
    ans = (xmax - xmin) * (xmax - xmin);
  else
    ans = (ymax - ymin) * (ymax - ymin);
  cout << ans << endl;
}
