#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int x, long long int y) {
  return y == 0 ? x : gcd(y, x % y);
}
bool isPalin(string x) {
  long long int len = x.length();
  for (int i = 0; i <= (len / 2) - 1; ++i) {
    if (x[i] != x[len - 1 - i]) return false;
  }
  return true;
}
string tolowerStr(string x) {
  string ret = "";
  for (int i = 0; i <= (long long int)x.length() - 1; ++i) {
    ret.push_back(tolower(x[i]));
  }
  return ret;
}
string toupperStr(string x) {
  string ret = "";
  for (int i = 0; i <= (long long int)x.length() - 1; ++i) {
    ret.push_back(toupper(x[i]));
  }
  return ret;
}
long long int modulo(long long int a, long long int b, long long int c) {
  long long int res = 1;
  for (int i = 0; i < b; i++) {
    res *= a;
    res %= c;
  }
  return res % c;
}
bool double_equals(double a, double b, double epsilon = 0.1) {
  return std::abs(a - b) < epsilon;
}
int main() {
  ios_base::sync_with_stdio(false);
  vector<pair<long long int, long long int> > v;
  long long int n, a, ans, l1, l2, xlow, xhigh, ylow, yhigh, b, l;
  cin >> n;
  for (int i = 0; i <= n - 1; ++i) {
    cin >> a >> b;
    v.push_back(make_pair(a, b));
  }
  sort(v.begin(), v.end());
  xlow = v[0].first;
  xhigh = v[n - 1].first;
  ylow = LONG_LONG_MAX;
  yhigh = -LONG_LONG_MAX;
  for (int i = 0; i <= v.size() - 1; ++i) {
    if (v[i].second < ylow) ylow = v[i].second;
    if (v[i].second > yhigh) yhigh = v[i].second;
  }
  l1 = ((xhigh - xlow) < 0 ? -(xhigh - xlow) : (xhigh - xlow));
  l2 = ((yhigh - ylow) < 0 ? -(yhigh - ylow) : (yhigh - ylow));
  l = ((l1) > (l2) ? (l1) : (l2));
  ans = l * l;
  cout << ans << endl;
  return 0;
}
