#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const int MINF = 1000 * 1000 * 1000 * (-1);
int lef = INF, righ = MINF, upp = MINF, downn = INF;
int main() {
  int n, x, y;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x < lef) lef = x;
    if (x > righ) righ = x;
    if (y > upp) upp = y;
    if (y < downn) downn = y;
  }
  long long ans = max((long long)(upp - downn), (long long)(righ - lef));
  cout << ans * ans;
}
