#include <bits/stdc++.h>
using namespace std;
int main() {
  long long mnx = INT_MAX, mxx = INT_MIN, mny = INT_MAX, mxy = INT_MIN;
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    mnx = min(mnx, a);
    mxx = max(mxx, a);
    mny = min(mny, b);
    mxy = max(mxy, b);
  }
  long long ans1 = abs(mnx - mxx);
  long long ans2 = abs(mny - mxy);
  long long ans = max(ans1, ans2);
  cout << (long long)ans * ans;
  return 0;
}
