#include <bits/stdc++.h>
using namespace std;
vector<long long int> adj[100001];
set<long long int> s;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long int n, i, j, k, mx = 0, my = 0;
  long long int x1, m, y1, x2, y2;
  cin >> n;
  vector<pair<long long int, long long int>> v(n);
  for (i = 0; i < n; i++) {
    cin >> v[i].first >> v[i].second;
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      mx = max(mx, abs(v[i].first - v[j].first));
      my = max(my, abs(v[i].second - v[j].second));
    }
  }
  m = max(mx, my);
  cout << m * m;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int tt = 1.0 * clock();
  int t;
  t = 1;
  for (int y = 0; y < t; y++) {
    solve();
  }
  return 0;
}
