#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return (a * b) / gcd(a, b);
}
int n;
long long a, b, ans = -1000000007, ans2 = 1000000007, big = -1000000007,
                big2 = 1000000007, res;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    ans = max(ans, a);
    ans2 = min(ans2, a);
    big = max(big, b);
    big2 = min(big2, b);
  }
  res = max(abs(ans - ans2), abs(big - big2));
  printf("%lld\n", res * res);
  return 0;
}
