#include <bits/stdc++.h>
using namespace std;
pair<int, int> pnt[100000 + 11];
int n;
pair<int, int> pref[100000 + 11];
pair<int, int> suf[100000 + 11];
const int inf = 1e9;
long long int eqd(int u, int v) {
  return ((long long int)pnt[u].first - pnt[v].first) *
             ((long long int)pnt[u].first - pnt[v].first) +
         ((long long int)pnt[u].second - pnt[v].second) *
             ((long long int)pnt[u].second - pnt[v].second);
}
long long int eqd(pair<int, int> u, pair<int, int> v) {
  pnt[n + 2] = u;
  pnt[n + 3] = v;
  return eqd(n + 2, n + 3);
}
bool oka(long long int D) {
  int i, j, k, dir, lo, hi, mid, st, ed, miny, maxy;
  for (i = 1; i <= n; i++) {
    if (pnt[i].first < 0)
      dir = +1;
    else
      dir = -1;
    lo = 1;
    hi = n;
    while (lo != hi) {
      mid = lo + (hi - lo + 1) / 2;
      j = i + mid * dir - dir;
      if (j < 1 || j > n)
        hi = mid - 1;
      else if (abs(pnt[j].first) <= abs(pnt[i].first) &&
               eqd(make_pair(pnt[i].first, 0), make_pair(pnt[j].first, 0)) <= D)
        lo = mid;
      else
        hi = mid - 1;
    }
    j = i + lo * dir - dir;
    st = min(i, j);
    ed = max(i, j);
    miny = min(pref[st - 1].first, suf[ed + 1].first);
    maxy = max(pref[st - 1].second, suf[ed + 1].second);
    if (((long long int)(maxy - miny) * (maxy - miny)) <= D &&
        max(eqd(make_pair(pnt[i].first, 0), make_pair(0, miny)),
            eqd(make_pair(pnt[i].first, 0), make_pair(0, maxy))) <= D)
      return true;
  }
  return false;
}
int main() {
  int i, j, k;
  long long int lo, hi, mid;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d %d", &pnt[i].first, &pnt[i].second);
  sort(pnt + 1, pnt + n + 1);
  pref[0] = make_pair(inf, -inf);
  for (i = 1; i <= n; i++)
    pref[i] = make_pair(min(pref[i - 1].first, pnt[i].second),
                        max(pref[i - 1].second, pnt[i].second));
  suf[n + 1] = make_pair(inf, -inf);
  for (i = n; i >= 1; i--)
    suf[i] = make_pair(min(suf[i + 1].first, pnt[i].second),
                       max(suf[i + 1].second, pnt[i].second));
  pref[0] = suf[n + 1] = make_pair(inf, -inf);
  lo = 0;
  hi = min(((long long int)(pref[n].second - pref[n].first) *
            (pref[n].second - pref[n].first)),
           ((long long int)(pnt[n].first - pnt[1].first) *
            (pnt[n].first - pnt[1].first)));
  while (lo != hi) {
    mid = (lo + hi) / 2;
    if (oka(mid))
      hi = mid;
    else
      lo = mid + 1;
  }
  cout << lo << endl;
  return 0;
}
