#include <bits/stdc++.h>
using namespace std;
const int maxn = 1100;
long long x, y;
int n;
int main() {
  std::ios::sync_with_stdio(false);
  while (cin >> n) {
    long long x1, x2, y1, y2;
    x1 = y1 = 1000000000;
    x2 = y2 = -1000000000;
    for (int i = 0; i < n; ++i) {
      cin >> x >> y;
      if (x < x1) x1 = x;
      if (y < y1) y1 = y;
      if (x > x2) x2 = x;
      if (y > y2) y2 = y;
    }
    unsigned long long s = max(abs(x2 - x1), abs(y2 - y1));
    cout << s * s << endl;
  }
  return 0;
}
