#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  pair<int, int> co[n];
  int minx = 1e9, maxx = -1e9, miny = 1e9, maxy = -1e9;
  for (int i = 0; i < n; i++) {
    cin >> co[i].first >> co[i].second;
    if (co[i].first > maxx) maxx = co[i].first;
    if (co[i].first < minx) minx = co[i].first;
    if (co[i].second > maxy) maxy = co[i].second;
    if (co[i].second < miny) miny = co[i].second;
  }
  int mx = max(maxx - minx, maxy - miny);
  long long area = pow(mx, 2);
  cout << area;
  return 0;
}
