#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
const int x = 1;
using namespace std;
long long qpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res *= a, res %= mod;
    a *= a;
    a %= mod;
    b >>= 1;
  }
  return res;
}
template <typename T>
string toString(T val) {
  ostringstream oss;
  oss << val;
  return oss.str();
}
template <typename T>
T fromString(const string& s) {
  istringstream iss(s);
  T res;
  iss >> res;
  return res;
}
long long isprime(long long n) {
  int i;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (i = 3; i <= sqrt(n); i += 2)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> x(n),
      you_will_never_guess_what_will_I_write_in_my_vector_next_time(n);
  for (int i = 0; i < n; i++) {
    cin >> x[i] >>
        you_will_never_guess_what_will_I_write_in_my_vector_next_time[i];
  }
  sort((x).begin(), (x).end());
  sort((you_will_never_guess_what_will_I_write_in_my_vector_next_time).begin(),
       (you_will_never_guess_what_will_I_write_in_my_vector_next_time).end());
  long long res = max(
      (x)[(n)-1] - (x)[0],
      (you_will_never_guess_what_will_I_write_in_my_vector_next_time)[(n)-1] -
          (you_will_never_guess_what_will_I_write_in_my_vector_next_time)[0]);
  cout << res * res;
  return 0;
}
