#include <bits/stdc++.h>
using namespace std;
const int inf = ~0u >> 2;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
int n, x, y, a, b, c, d;
int main() {
  ios_base::sync_with_stdio(0);
  while (cin >> n) {
    a = b = 1e9;
    c = d = -1e9;
    for (int i = 1; i < (n + 1); ++i) {
      cin >> x >> y;
      a = min(x, a);
      b = min(y, b);
      c = max(x, c);
      d = max(y, d);
    }
    long long ans = max(c - a, d - b);
    cout << ans * ans << endl;
  }
  return 0;
}
