#include <bits/stdc++.h>
using namespace std;
long long int maxi(long long int a, long long int b) { return (a > b) ? a : b; }
long long int mini(long long int a, long long int b) { return (a < b) ? a : b; }
int main(int argc, char const *argv[]) {
  long long int n, maxx = -1000000000, minx = 1000000000, maxy = -1000000000,
                   miny = 1000000000, x, y;
  scanf("%lld", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &x);
    scanf("%lld", &y);
    if (x > maxx) maxx = x;
    if (x < minx) minx = x;
    if (y > maxy) maxy = y;
    if (y < miny) miny = y;
  }
  long long int area = maxi(abs(maxx - minx), abs(maxy - miny));
  area *= area;
  cout << area << endl;
  return 0;
}
