#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
} p[1005];
bool cmp1(point a, point b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
bool cmp2(point a, point b) {
  if (a.y == b.y) return a.x < b.x;
  return a.y < b.y;
}
int main() {
  long long n, w, h;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].x >> p[i].y;
  }
  sort(p + 1, p + 1 + n, cmp1);
  w = p[n].x - p[1].x;
  sort(p + 1, p + 1 + n, cmp2);
  h = p[n].y - p[1].y;
  cout << max(w, h) * max(w, h) << endl;
  return 0;
}
