#include <bits/stdc++.h>
long long int max(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}
long long int min(long long int a, long long int b) {
  if (a < b)
    return a;
  else
    return b;
}
int main() {
  long long int n, x1, x2, y1, y2, xmin, xmax, ymin, ymax, ans;
  scanf("%lld", &n);
  n = n - 2;
  scanf("%lld %lld", &x1, &y1);
  scanf("%lld %lld", &x2, &y2);
  xmin = min(x1, x2);
  xmax = max(x1, x2);
  ymin = min(y1, y2);
  ymax = max(y1, y2);
  while (n--) {
    scanf("%lld %lld", &x1, &y1);
    xmin = min(xmin, x1);
    xmax = max(xmax, x1);
    ymin = min(ymin, y1);
    ymax = max(ymax, y1);
  }
  ans = max(abs(xmin - xmax), abs(ymin - ymax));
  ans = ans * ans;
  printf("%lld", ans);
  return 0;
}
