#include <bits/stdc++.h>
using namespace std;
int maxx, minx, maxy, miny;
int x[1005], y[1005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  minx = 2000000000;
  miny = 2000000000;
  maxx = -2000000000;
  maxy = -2000000000;
  for (int i = 1; i <= n; i++)
    minx = min(x[i], minx), maxx = max(maxx, x[i]), miny = min(y[i], miny),
    maxy = max(maxy, y[i]);
  cout << (long long)max(maxx - minx, maxy - miny) *
              max(maxx - minx, maxy - miny)
       << endl;
  return 0;
}
