#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, l, p, q, x, y;
  long long int t;
  cin >> t;
  int maxx = INT_MIN;
  int maxy = INT_MIN;
  int minx = INT_MAX;
  int miny = INT_MAX;
  while (t--) {
    cin >> p;
    cin >> q;
    if (p > maxx) maxx = p;
    if (p < minx) minx = p;
    if (q > maxy) maxy = q;
    if (q < miny) miny = q;
  }
  long long int len = max(maxx - minx, maxy - miny);
  cout << len * len << endl;
  return 0;
}
