#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b[1002] = {0}, c[1002] = {0}, ma = -1, z;
  cin.sync_with_stdio(false);
  cin >> a;
  cin >> b[0] >> c[0];
  for (int i = 1; i < a; i++) {
    cin >> b[i] >> c[i];
    for (int j = i - 1; j >= 0; j--) {
      z = max(abs(b[i] - b[j]), abs(c[i] - c[j]));
      if (z > ma) ma = z;
    }
  }
  cout << (long long)ma * ma;
  return 0;
}
