#include <bits/stdc++.h>
using namespace std;
int n, x, y;
int main(int argc, const char* argv[]) {
  scanf("%d", &n);
  int z = 0x3f3f3f3f, you = -0x3f3f3f3f, xia = 0x3f3f3f3f, s = -0x3f3f3f3f;
  for (int i = 1; i < (n + 1); i++) {
    scanf("%d%d", &x, &y);
    if (x < z) z = x;
    if (x > you) you = x;
    if (y < xia) xia = y;
    if (y > s) s = y;
  }
  long long cnt = max(you - z, s - xia);
  printf("%I64d\n", cnt * cnt);
  return 0;
}
