#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
long long twice(int a) { return ((long long)a * a); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int N;
  cin >> N;
  pair<int, int> points[N];
  int max_y = -INF, min_y = INF, max_x = -INF, min_x = INF;
  for (int i = 0; i < N; ++i) {
    cin >> points[i].first >> points[i].second;
    max_x = max(max_x, points[i].first);
    min_x = min(min_x, points[i].first);
    max_y = max(max_y, points[i].second);
    min_y = min(min_y, points[i].second);
  }
  cout << twice(max((max_x - min_x), (max_y - min_y)));
  return 0;
}
