#include <bits/stdc++.h>
int main() {
  int n, x[1000], y[1000], i, mx, nx, my, ny;
  long long int a, b, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &x[i], &y[i]);
  }
  mx = x[0];
  nx = x[0];
  my = y[0];
  ny = y[0];
  for (i = 0; i < n; i++) {
    if (x[i] >= mx) {
      mx = x[i];
    }
    if (x[i] <= nx) {
      nx = x[i];
    }
    if (y[i] >= my) {
      my = y[i];
    }
    if (y[i] <= ny) {
      ny = y[i];
    }
  }
  a = mx - nx;
  b = my - ny;
  if (a >= b) {
    k = a * a;
    printf("%lld", k);
    return 0;
  } else {
    k = b * b;
    printf("%lld", k);
  }
  return 0;
}
