#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long minx = 100000000000, miny = 100000000000;
  long long maxx = -100000000000, maxy = -100000000000;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x < minx) minx = x;
    if (y < miny) miny = y;
    if (x > maxx) maxx = x;
    if (y > maxy) maxy = y;
  }
  long long len = (maxx - minx);
  long long height = (maxy - miny);
  if (len > height)
    cout << (long long)len * len;
  else
    cout << (long long)height * height;
}
