#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x, y;
  cin >> n;
  int minx = 1e9, miny = 1e9, maxx = -1e9, maxy = -1e9;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    minx = min(x, minx);
    miny = min(y, miny);
    maxx = max(maxx, x);
    maxy = max(maxy, y);
  }
  long long ans = max((maxx - minx), (maxy - miny));
  if (ans == 0)
    cout << 1;
  else
    cout << ans * ans;
  return 0;
}
