#include <bits/stdc++.h>
using namespace std;
int64_t n, xMin, yMin, xMax, yMax, x, y;
int main() {
  cin >> n;
  cin >> x >> y;
  xMin = xMax = x;
  yMin = yMax = y;
  while (--n) {
    cin >> x >> y;
    if (x < xMin)
      xMin = x;
    else if (x > xMax)
      xMax = x;
    if (y < yMin)
      yMin = y;
    else if (y > yMax)
      yMax = y;
  }
  if (xMax - xMin > yMax - yMin)
    cout << (xMax - xMin) * (xMax - xMin);
  else
    cout << (yMax - yMin) * (yMax - yMin);
  return 0;
}
