#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
const int M = 5e3 + 50;
int n, m, u, v, k, l, r, t, c;
int cnt, cnt1, cnt2, ans;
int mn = INT_MAX;
int mx = INT_MIN;
const int fx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int fy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
int visited[N];
const int MOD = (1ll << 30);
bool cmp(pair<int, int> a, pair<int, int> b) {
  return abs(a.first) > abs(b.first);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n;
  long long mx1 = INT_MAX;
  long long mx2 = INT_MIN;
  long long my1 = INT_MAX;
  long long my2 = INT_MIN;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    mx1 = min(mx1, x);
    mx2 = max(mx2, x);
    my1 = min(my1, y);
    my2 = max(my2, y);
  }
  long long side = max((mx2 - mx1), (my2 - my1));
  cout << side * side;
}
