#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int minx, maxx, miny, maxy;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x < minx || i == 0) minx = x;
    if (x > maxx || i == 0) maxx = x;
    if (y < miny || i == 0) miny = y;
    if (y > maxy || i == 0) maxy = y;
  }
  if (maxx != minx && maxy != miny) {
    long long pby = abs(maxy - miny);
    long long pbx = abs(maxx - minx);
    if (pbx > pby)
      cout << pbx * pbx;
    else
      cout << pby * pby;
  } else if (maxx == minx) {
    long long pby = abs(maxy - miny);
    cout << pby * pby;
  } else if (maxy == miny) {
    long long pbx = abs(maxx - minx);
    cout << pbx * pbx;
  }
  return 0;
}
