#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool mmax(T &m, const T q) {
  if (m < q) {
    m = q;
    return true;
  } else
    return false;
}
template <typename T>
bool mmin(T &m, const T q) {
  if (m > q) {
    m = q;
    return true;
  } else
    return false;
}
long long square(pair<long long, long long> a, pair<long long, long long> b) {
  return 1ll * abs(a.first - b.first) * abs(a.second - b.second);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, x1, x2, y1, y2;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long first, second;
    cin >> first >> second;
    if (i == 0) {
      x1 = first;
      x2 = first;
      y1 = second;
      y2 = second;
      continue;
    }
    x1 = max(x1, first);
    x2 = min(x2, first);
    y1 = max(y1, second);
    y2 = min(y2, second);
  }
  long long m = max(abs(x1 - x2), abs(y1 - y2));
  long long ans = 1ll * m * m;
  cout << ans;
  return 0;
}
