#include <bits/stdc++.h>
using namespace std;
long long int N, sol = 1000000007, sag = -1000000007, yukari = 1000000007,
                 asagi = -1000000007;
int main() {
  long long int a, b;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    scanf("%lld %lld", &a, &b);
    if (a > asagi) asagi = a;
    if (a < yukari) yukari = a;
    if (b > sag) sag = b;
    if (b < sol) sol = b;
  }
  printf("%lld\n",
         max(asagi - yukari, sag - sol) * max(asagi - yukari, sag - sol));
  return 0;
}
