#include <bits/stdc++.h>
using namespace std;
long long n, a[1005], b[1005], mi1 = INT_MAX, mi2 = INT_MAX, ma1 = INT_MIN,
                               ma2 = INT_MIN, res;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    mi1 = min(mi1, a[i]);
    ma1 = max(ma1, a[i]);
    mi2 = min(mi2, b[i]);
    ma2 = max(ma2, b[i]);
  }
  res = pow(max(ma1 - mi1, ma2 - mi2), 2);
  cout << res;
}
