#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, i, min1, min2, max1, max2, a[10000], b[10000];
  cin >> n;
  t = n;
  while (n--) {
    cin >> a[i] >> b[i];
    i++;
  }
  max1 = a[0];
  max2 = b[0];
  min1 = a[0];
  min2 = b[0];
  for (i = 0; i < t; i++) {
    if (a[i] > max1) max1 = a[i];
    if (b[i] > max2) max2 = b[i];
    if (a[i] <= min1) min1 = a[i];
    if (b[i] <= min2) min2 = b[i];
  }
  max1 = max1 - min1;
  max2 = max2 - min2;
  if (max1 >= max2)
    cout << max1 * max1;
  else
    cout << max2 * max2;
  return 0;
}
