#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x, y;
  cin >> x >> y;
  int minX = x;
  int maxX = x;
  int minY = y;
  int maxY = y;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    minX = min(minX, x);
    maxX = max(maxX, x);
    minY = min(minY, y);
    maxY = max(maxY, y);
  }
  long long a = max(maxX - minX, maxY - minY);
  cout << a * a << endl;
  return 0;
}
