#include <bits/stdc++.h>
using namespace std;
const long long INF = 999999999999l;
long long mxX = -INF, mnX = INF, mnY = INF, mxY = -INF, n, x, y;
int main() {
  cin >> n;
  while (n--) {
    cin >> x >> y;
    mnX = min(mnX, x);
    mnY = min(mnY, y);
    mxX = max(mxX, x);
    mxY = max(mxY, y);
  }
  long long leg = max(mxX - mnX, mxY - mnY);
  cout << leg * leg << endl;
  return 0;
}
