#include <bits/stdc++.h>
int main() {
  long long int i, j, x, y, n, a = -1000000011, b = 1000000011, c = -1000000011,
                               d = 1000000011;
  scanf("%lld", &n);
  while (n--) {
    scanf("%lld%lld", &x, &y);
    if (x > a) a = x;
    if (x < b) b = x;
    if (y > c) c = y;
    if (y < d) d = y;
  }
  x = a - b;
  y = c - d;
  x = (x > y) ? x : y;
  printf("%lld\n", x * x);
  return 0;
}
