#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long x, y;
  long long minx, miny, maxx, maxy;
  minx = 10000000000;
  miny = 10000000000;
  maxx = -10000000000;
  maxy = -10000000000;
  int i = 0;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (x >= maxx) maxx = x;
    if (y >= maxy) maxy = y;
    if (x <= minx) minx = x;
    if (y <= miny) miny = y;
  }
  long long area;
  if ((maxx - minx) >= (maxy - miny))
    area = ((maxx - minx) * (maxx - minx));
  else
    area = ((maxy - miny) * (maxy - miny));
  cout << area;
  return 0;
}
