#include <bits/stdc++.h>
using namespace std;
long long n, xmn = INFINITY, xmx = -INFINITY, ymn = INFINITY, ymx = -INFINITY,
             x;
int main() {
  cin >> n;
  while (n--) {
    long long x1, y1;
    cin >> x1 >> y1;
    (xmx) = max((xmx), (x1));
    (xmn) = min((xmn), (x1));
    (ymx) = max((ymx), (y1));
    (ymn) = min((ymn), (y1));
  }
  x = max(xmx - xmn, ymx - ymn);
  return cout << x * x << '\n', false;
}
