#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n;
long long X;
struct point {
  int x, y;
} a[N];
long long max(long long a, int b) { return a > b ? a : b; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &a[i].x, &a[i].y);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) X = max(X, abs(a[i].x - a[j].x));
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) X = max(X, abs(a[i].y - a[j].y));
  printf("%I64d", X * X);
  return 0;
}
