#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, j, r, m, i, f;
  long long int x[1005], y[1005];
  long long int s = 0, g, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%I64d %I64d", &x[i], &y[i]);
  }
  sort(x, x + n);
  sort(y, y + n);
  g = x[n - 1] - x[0];
  k = y[n - 1] - y[0];
  if (g >= k)
    s = g * g;
  else
    s = k * k;
  printf("%I64d\n", s);
  return 0;
}
