#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000000;
const double EPS = 1e-9;
int mods(int a, int b) { return (b + (a % b)) % b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, x, y, x1 = INF, x2 = -INF, y1 = INF, y2 = -INF;
  long long d;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    x1 = min(x1, x);
    x2 = max(x2, x);
    y1 = min(y1, y);
    y2 = max(y2, y);
  }
  d = max(abs(x2 - x1), abs(y2 - y1));
  cout << d * d << '\n';
  return 0;
}
