#include <bits/stdc++.h>
using namespace std;
int N;
int main() {
  int xmin = 2e9, xmax = -2e9, ymin = 2e9, ymax = -2e9;
  scanf(" %d", &N);
  for (int i = 1, a, b; i <= N; i++) {
    scanf(" %d %d", &a, &b);
    xmin = min(xmin, a);
    xmax = max(xmax, a);
    ymin = min(ymin, b);
    ymax = max(ymax, b);
  }
  int mx = max(xmax - xmin, ymax - ymin);
  printf("%lld\n", 1ll * mx * mx);
  return 0;
}
