#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, y, xmin, xmax, ymin, ymax, ans, p1, p2;
  vector<long long> px, py;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    px.push_back(x);
    py.push_back(y);
  }
  sort(px.begin(), px.end());
  sort(py.begin(), py.end());
  xmin = px[0];
  xmax = px[px.size() - 1];
  ymin = py[0];
  ymax = py[py.size() - 1];
  p1 = xmax - xmin;
  p2 = ymax - ymin;
  ans = max(p1, p2);
  ans *= ans;
  cout << ans << endl;
  return 0;
}
