#include <bits/stdc++.h>
using namespace std;
void *malloc(size_t size);
int main() {
  long long int y, x, min_x, min_y, max_x, max_y, s;
  int n, i;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (i == 0) {
      max_x = min_x = x;
      max_y = min_y = y;
    } else {
      if (x > max_x) {
        max_x = x;
      }
      if (x < min_x) {
        min_x = x;
      }
      if (y > max_y) {
        max_y = y;
      }
      if (y < min_y) {
        min_y = y;
      }
    }
  }
  s = max(abs(max_y - min_y), abs(max_x - min_x));
  cout << s * s << endl;
  return 0;
}
