#include <bits/stdc++.h>
using namespace std;
long long xmax, ymax, xmin, ymin, x, y;
int n;
int main() {
  xmax = -10000000000;
  ymax = xmax;
  xmin = 10000000000;
  ymin = xmin;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    xmax = ((xmax > x) ? xmax : x);
    ymax = ((ymax > y) ? ymax : y);
    xmin = ((xmin < x) ? xmin : x);
    ymin = ((ymin < y) ? ymin : y);
  }
  long long res;
  res = (((xmax - xmin) > (ymax - ymin)) ? (xmax - xmin) : (ymax - ymin));
  cout << res * res;
}
