#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[100002];
int mxl[100002], mnl[100002], mxr[100002], mnr[100002];
int n;
long long sqr(long long x) { return x * x; }
bool check(long long M) {
  int x, y;
  x = y = 1;
  long long mn = 1ll << 60;
  while (x <= n) {
    while (sqr((long long)p[x].first - p[y].first) > M) y++;
    long long mx = sqr((long long)p[x].first - p[y].first);
    if (x != n && y != 1) {
      int mny = min(mnl[y - 1], mnr[x + 1]), mxy = max(mxl[y - 1], mxr[x + 1]);
      mx = max(mx, sqr((long long)mxy - mny));
      mx = max(mx, max(sqr((long long)p[x].first), sqr((long long)p[y].first)) +
                       max(sqr((long long)mny), sqr((long long)mxy)));
    } else if (y != 1) {
      int mny = mnl[y - 1], mxy = mxl[y - 1];
      mx = max(mx, sqr((long long)mxy - mny));
      mx = max(mx, max(sqr((long long)p[x].first), sqr((long long)p[y].first)) +
                       max(sqr((long long)mny), sqr((long long)mxy)));
    } else if (x != n) {
      int mny = mnr[x + 1], mxy = mxr[x + 1];
      mx = max(mx, sqr((long long)mxy - mny));
      mx = max(mx, max(sqr((long long)p[x].first), sqr((long long)p[y].first)) +
                       max(sqr((long long)mny), sqr((long long)mxy)));
    }
    mn = min(mn, mx);
    x++;
  }
  return mn <= M;
}
long long solve() {
  sort(p + 1, p + n + 1);
  long long l = 0, r = sqr((long long)p[n].first - p[1].first), mid, res;
  mnl[1] = mxl[1] = p[1].second;
  for (int i = 2; i < n + 1; i++) {
    mnl[i] = min(mnl[i - 1], p[i].second);
    mxl[i] = max(mxl[i - 1], p[i].second);
  }
  mnr[n] = mxr[n] = p[n].second;
  for (int i = n - 1; i > 0; --i) {
    mnr[i] = min(mnr[i + 1], p[i].second);
    mxr[i] = max(mxr[i + 1], p[i].second);
  }
  while (l <= r) {
    mid = (r + l) >> 1;
    if (check(mid)) {
      r = mid - 1;
      res = mid;
    } else
      l = mid + 1;
  }
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &p[i].first);
    scanf("%d", &p[i].second);
  }
  long long res = solve();
  for (int i = 1; i < n + 1; i++) swap(p[i].first, p[i].second);
  res = min(res, solve());
  printf("%I64d", res);
  return 0;
}
