#include <bits/stdc++.h>
using namespace std;
long long x, y;
int main(int argc, const char* argv[]) {
  long long minx = INTMAX_MAX, maxx, miny, maxy;
  maxx = -minx;
  maxy = -minx;
  miny = minx;
  int i, n;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (minx > x) minx = x;
    if (maxx < x) maxx = x;
    if (miny > y) miny = y;
    if (maxy < y) maxy = y;
  }
  long long difx, dify;
  difx = maxx - minx;
  dify = maxy - miny;
  if (difx > dify)
    cout << difx * difx;
  else
    cout << dify * dify;
  return 0;
}
