#include <bits/stdc++.h>
using namespace std;
int n;
pair<long long, long long> p[100010];
long long premx[100010], premn[100010], sufmx[100010], sufmn[100010];
inline long long sqr(long long x) { return x * x; }
inline bool check(long long len) {
  for (int i = 1, j = 1, k = n; i <= n && p[i].first <= 0; i++) {
    while (j <= n && sqr(p[j + 1].first - p[i].first) <= len) j++;
    while (k > i && abs(p[k].first) > abs(p[i].first)) k--;
    if (i == 1 && min(j, k) == n) return 1;
    long long mxy = max(premx[i - 1], sufmx[min(j, k) + 1]),
              mny = min(premn[i - 1], sufmn[min(j, k) + 1]);
    if (sqr(mxy - mny) <= len &&
        max(sqr(mxy), sqr(mny)) + sqr(p[i].first) <= len)
      return 1;
  }
  for (int i = n, j = n, k = 1; i >= 1 && p[i].first > 0; i--) {
    while (j >= 1 && sqr(p[j - 1].first - p[i].first) <= len) j--;
    while (k < i && abs(p[k].first) > abs(p[i].first)) k++;
    if (i == n && max(j, k) == 1) return 1;
    long long mxy = max(sufmx[i + 1], premx[max(j, k) - 1]),
              mny = min(sufmn[i + 1], premn[max(j, k) - 1]);
    if (sqr(mxy - mny) <= len &&
        max(sqr(mxy), sqr(mny)) + sqr(p[i].first) <= len)
      return 1;
  }
  return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld%lld", &p[i].first, &p[i].second);
  sort(p + 1, p + n + 1);
  premx[0] = 0;
  premn[0] = 0;
  for (int i = 1; i <= n; i++) {
    premx[i] = max(premx[i - 1], p[i].second);
    premn[i] = min(premn[i - 1], p[i].second);
  }
  sufmx[n + 1] = 0;
  sufmn[n + 1] = 0;
  for (int i = n; i >= 1; i--) {
    sufmx[i] = max(sufmx[i + 1], p[i].second);
    sufmn[i] = min(sufmn[i + 1], p[i].second);
  }
  long long pmx = -1e9, pmn = 1e9;
  for (int i = 1; i <= n; i++)
    pmx = max(pmx, p[i].second), pmn = min(pmn, p[i].second);
  long long L = 0, R = min(sqr(p[n].first - p[1].first), sqr(pmx - pmn)),
            ans = R;
  while (L <= R) {
    long long mid = (L + R) >> 1;
    if (check(mid))
      ans = mid, R = mid - 1;
    else
      L = mid + 1;
  }
  printf("%lld\n", ans);
  return 0;
}
