#include <bits/stdc++.h>
time_t waktu = clock();
void gettime() {
  printf("\nTime : %.2lf", (clock() - waktu) / double(CLOCKS_PER_SEC));
}
bool comp(int a, int b) { return (a > b); }
using namespace std;
int main() {
  int n, xmaks, xmin, ymaks, ymin, x, y, i;
  long long int hasil = 0, hasil2 = 0, total = 0;
  scanf("%d", &n);
  scanf("%d %d", &x, &y);
  xmaks = x;
  xmin = x;
  ymaks = y;
  ymin = y;
  for (i = 1; i < n; i++) {
    scanf("%d %d", &x, &y);
    if (x > xmaks)
      xmaks = x;
    else if (x < xmin)
      xmin = x;
    if (y > ymaks)
      ymaks = y;
    else if (y < ymin)
      ymin = y;
  }
  hasil = xmaks;
  hasil -= xmin;
  hasil2 = ymaks;
  hasil2 -= ymin;
  total = max(hasil, hasil2);
  total *= total;
  cout << total;
  return 0;
}
