#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
long long a, b, mix, maX, miy, may;
int main() {
  int n;
  while (cin >> n) {
    mix = maX = miy = may = INF;
    for (int i = 0; i < n; ++i) {
      cin >> a >> b;
      if (mix == maX && maX == INF) {
        mix = maX = a;
        miy = may = b;
      } else {
        mix = min(mix, a);
        maX = max(maX, a);
        miy = min(miy, b);
        may = max(may, b);
      }
    }
    long long maxx = max(abs(maX - mix), abs(may - miy));
    cout << maxx * maxx << endl;
  }
  return 0;
}
