#include <bits/stdc++.h>
using namespace std;
template <typename T>
void printArray(T arr, int l) {
  for (int i = 0; i < l; i++) cout << arr[i] << " ";
  cout << endl;
}
int main(void) {
  int n;
  cin >> n;
  int x1, y1, x2, y2;
  cin >> x1 >> y1;
  x2 = x1;
  y2 = y1;
  int x, y;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    if (x < x1)
      x1 = x;
    else if (x > x2)
      x2 = x;
    if (y < y1)
      y1 = y;
    else if (y > y2)
      y2 = y;
  }
  long long int side = max(x2 - x1, y2 - y1);
  cout << side * side << endl;
  return 0;
}
