#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target( \
    "fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << '{';
  string sep;
  for (const auto &x : v) os << sep << x, sep = ", ";
  return os << '}';
}
template <typename T, size_t size>
ostream &operator<<(ostream &os, const array<T, size> &arr) {
  os << '{';
  string sep;
  for (const auto &x : arr) os << sep << x, sep = ", ";
  return os << '}';
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
  return os << '(' << p.first << ", " << p.second << ')';
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << ' ' << H;
  debug_out(T...);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  pair<int, int> X = {1e9, -1e9};
  pair<int, int> Y = {1e9, -1e9};
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    X.first = min(X.first, x);
    X.second = max(X.second, x);
    Y.first = min(Y.first, y);
    Y.second = max(Y.second, y);
  }
  int d1 = abs(X.first - X.second);
  int d2 = abs(Y.first - Y.second);
  cout << max(1LL * d1 * d1, 1LL * d2 * d2) << '\n';
  return 0;
}
