#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int arrx[n];
  int arry[n];
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &arrx[i], &arry[i]);
  }
  int minx = 1000000000;
  int miny = 1000000000;
  int maxx = -1000000000;
  int maxy = -1000000000;
  for (int i = 0; i < n; i++) {
    if (arrx[i] > maxx) maxx = arrx[i];
    if (arrx[i] < minx) minx = arrx[i];
    if (arry[i] > maxy) maxy = arry[i];
    if (arry[i] < miny) miny = arry[i];
  }
  long long a = maxx - minx;
  long long b = maxy - miny;
  if (a > b)
    printf("%lld\n", a * a);
  else
    printf("%lld\n", b * b);
}
