#include <bits/stdc++.h>
using namespace std;
long long int n, x[1100], y[1100], ans1 = 0, ans2 = 0;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      ans1 = max(abs(y[j] - y[i]), abs(x[j] - x[i]));
      ans2 = max(ans1, ans2);
    }
  }
  cout << ans2 * ans2;
  return 0;
}
