#include <bits/stdc++.h>
using namespace std;
const int inf = 1e8 + 10;
const int Nmax = 100000 + 10;
int n, i;
int maxL[Nmax], maxR[Nmax], minL[Nmax], minR[Nmax];
pair<int, int> a[Nmax];
long long dist(int ox, int oy) { return 1LL * ox * ox + 1LL * oy * oy; }
int abs(int first) {
  if (first < 0) return -first;
  return first;
}
bool now(int pos, int ymin, int ymax, long long dmax) {
  if (dist(a[pos].first, 0) > dmax) return 0;
  if (ymax != -inf && ymin != inf && dist(0, ymax - ymin) > dmax) return 0;
  if (ymax != -inf && dist(a[pos].first, ymax) > dmax) return 0;
  if (ymin != inf && dist(a[pos].first, ymin) > dmax) return 0;
  return 1;
}
bool check(long long dmax) {
  int L, R;
  int ymin, ymax;
  if (dist(a[n].first - a[1].first, 0) <= dmax) return 1;
  if (dist(0, maxL[n] - minL[n]) <= dmax) return 1;
  for (R = 1, i = 1; i <= n; ++i) {
    if (a[i].first > 0) break;
    R = max(i, R);
    if (dist(a[i].first, 0) > dmax) continue;
    while (R < n && abs(a[R + 1].first) <= abs(a[i].first) &&
           dist(a[R + 1].first - a[i].first, 0) <= dmax)
      R++;
    while (R > i && abs(a[R].first) > abs(a[i].first)) R--;
    while (R > i && dist(a[R].first - a[i].first, 0) > dmax) R--;
    ymax = max(maxL[i - 1], maxR[R + 1]);
    ymin = min(minL[i - 1], minR[R + 1]);
    if (now(i, ymin, ymax, dmax)) return 1;
  }
  for (L = n, i = n; i; --i) {
    if (a[i].first < 0) break;
    L = min(i, L);
    if (dist(a[i].first, 0) > dmax) continue;
    while (L > 1 && abs(a[L - 1].first) <= abs(a[i].first) &&
           dist(a[L - 1].first - a[i].first, 0) <= dmax)
      L--;
    while (L < i && abs(a[L].first) > abs(a[i].first)) L++;
    while (L < i && dist(a[L].first - a[i].first, 0) > dmax) L++;
    ymax = max(maxL[L - 1], maxR[i + 1]);
    ymin = min(minL[L - 1], minR[i + 1]);
    if (now(i, ymin, ymax, dmax)) return 1;
  }
  return 0;
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d %d", &a[i].first, &a[i].second);
  sort(a + 1, a + n + 1);
  minL[0] = inf;
  maxL[0] = -inf;
  for (i = 1; i <= n; ++i) {
    minL[i] = min(minL[i - 1], a[i].second);
    maxL[i] = max(maxL[i - 1], a[i].second);
  }
  minR[n + 1] = inf;
  maxR[n + 1] = -inf;
  for (i = n; i; --i) {
    minR[i] = min(minR[i + 1], a[i].second);
    maxR[i] = max(maxR[i + 1], a[i].second);
  }
  long long L = 0LL;
  long long R = 100LL * inf * inf;
  long long ans;
  while (L <= R) {
    long long mid = (L + R) >> 1;
    if (check(mid))
      ans = mid, R = mid - 1;
    else
      L = mid + 1;
  }
  printf("%I64d\n", ans);
  return 0;
}
