#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, max_x = -1e9, min_x = 1e9, max_y = -1e9, min_y = 1e9;
struct data {
  long long x;
  long long y;
};
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  vector<data> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i].x >> v[i].y;
    max_x = max(max_x, v[i].x);
    min_x = min(min_x, v[i].x);
    max_y = max(max_y, v[i].y);
    min_y = min(min_y, v[i].y);
  }
  long long side = max(max_x - min_x, max_y - min_y);
  cout << side * side << "\n";
  return 0;
}
