#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x[1000], y[1000], c, n, m, l;
  long long maxiX = 0, miniX = 10000000, cnt;
  long long maxiY = 0, miniY = 10000000;
  long long sum = 0, sum1 = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    cin >> y[i];
  }
  sort(x, x + n);
  sort(y, y + n);
  cnt = max((x[n - 1] - x[0]), y[n - 1] - y[0]);
  cout << cnt * cnt;
  return 0;
}
