#include <bits/stdc++.h>
int main() {
  int input, min_x, max_x, min_y, max_y;
  long long int x, y;
  min_x = 1000000009;
  max_x = -1000000009;
  min_y = 1000000009;
  max_y = -1000000009;
  scanf("%d", &input);
  for (int a = 1; a <= input; a++) {
    scanf("%I64d %I64d", &x, &y);
    if (x < min_x) {
      min_x = x;
    }
    if (x > max_x) {
      max_x = x;
    }
    if (y < min_y) {
      min_y = y;
    }
    if (y > max_y) {
      max_y = y;
    }
  }
  long long int total;
  x = fabs(max_x - min_x);
  y = fabs(max_y - min_y);
  if (x > y) {
    total = x * x;
  } else {
    total = y * y;
  }
  printf("%I64d", total);
  return 0;
}
