#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
const int BIG = 1E9;
long long ans = 1E18;
int n;
pair<int, int> in[MAXN];
int pup[MAXN], pdown[MAXN];
int sup[MAXN], sdown[MAXN];
long long Sqr(long long w) { return w * w; }
bool OK(const pair<int, int>& f, const pair<int, int>& s, long long dist) {
  return Sqr(f.first - s.first) + Sqr(f.second - s.second) <= dist;
}
bool Can(long long dist) {
  int up = n;
  for (int i = n; i > 0; --i)
    if (in[i].first <= 0) {
      while (Sqr(in[i].first - in[up].first) > dist) --up;
      int sym =
          lower_bound(in + 1, in + n + 1, make_pair(-in[i].first, BIG)) - in;
      int _up = min(up, sym - 1);
      if (i == 1 && _up == n) return true;
      int hi = max(sup[_up + 1], pup[i - 1]);
      int lo = min(sdown[_up + 1], pdown[i - 1]);
      if (OK(make_pair(0, hi), make_pair(0, lo), dist) &&
          OK(make_pair(0, hi), make_pair(in[i].first, 0), dist) &&
          OK(make_pair(0, lo), make_pair(in[i].first, 0), dist))
        return true;
    }
  up = 1;
  for (int i = 1; i <= n; ++i)
    if (in[i].first >= 0) {
      while (Sqr(in[i].first - in[up].first) > dist) ++up;
      int sym =
          lower_bound(in + 1, in + n + 1, make_pair(-in[i].first, -BIG)) - in;
      int _up = max(up, sym);
      if (_up == 1 && i == n) return true;
      int hi = max(sup[i + 1], pup[_up - 1]);
      int lo = min(sdown[i + 1], pdown[_up - 1]);
      if (OK(make_pair(0, hi), make_pair(0, lo), dist) &&
          OK(make_pair(0, hi), make_pair(in[i].first, 0), dist) &&
          OK(make_pair(0, lo), make_pair(in[i].first, 0), dist)) {
        return true;
      }
    }
  return false;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &in[i].first, &in[i].second);
  sort(in + 1, in + n + 1);
  pup[0] = -BIG, pdown[0] = BIG;
  for (int i = 1; i <= n; ++i)
    pup[i] = max(pup[i - 1], in[i].second),
    pdown[i] = min(pdown[i - 1], in[i].second);
  sup[n + 1] = -BIG, sdown[n + 1] = BIG;
  for (int i = n; i > 0; --i)
    sup[i] = max(sup[i + 1], in[i].second),
    sdown[i] = min(sdown[i + 1], in[i].second);
  (ans) = min((ans), (Sqr(pup[n] - pdown[n])));
  long long lo = 0, hi = 1E18, mid;
  for (;;) {
    if (lo + 1 >= hi) {
      if (Can(lo))
        (ans) = min((ans), (lo));
      else
        (ans) = min((ans), (hi));
      break;
    }
    mid = (lo + hi) >> 1;
    if (Can(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << ans << '\n';
  return 0;
}
