#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, minX = INT_MAX, maxX = INT_MIN, minY = INT_MAX, maxY = INT_MIN;
  scanf("%d", &n);
  while (n--) {
    scanf("%d%d", &x, &y);
    minX = min(minX, x);
    minY = min(minY, y);
    maxX = max(maxX, x);
    maxY = max(maxY, y);
  }
  long long arm = (long long)max((maxX - minX), (maxY - minY));
  cout << arm * arm << endl;
  return 0;
}
