#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long x[n], y[n];
  for (long long i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  long long height = 0;
  long long width = 0;
  for (long long i = 0; i < n - 1; i++) {
    for (long long j = i + 1; j < n; j++) {
      height = max(height, abs(x[j] - x[i]));
      width = max(width, abs(y[j] - y[i]));
    }
  }
  cout << max(height, width) * max(height, width);
  return 0;
}
