#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const long long oo = 1 << 30;
const long long loo = 1ll << 62;
const long long mods = 998244353;
const long long MAXN = 200005;
const long long INF = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
long long n;
pair<long long, long long> p[MAXN], L[MAXN], R[MAXN];
long long Check(long long x, long long mid, long long y) {
  return abs(p[mid].first) <= abs(p[x].first) &&
         (p[x].first - p[mid].first) * (p[x].first - p[mid].first) <= y;
}
long long findr(long long x, long long y) {
  long long l = x, r = n;
  while (l < r) {
    long long mid = (l + r + 1) >> 1;
    if (Check(x, mid, y))
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
long long findl(long long x, long long y) {
  long long l = 1, r = x;
  while (l < r) {
    long long mid = (l + r) >> 1;
    if (Check(x, mid, y))
      r = mid;
    else
      l = mid + 1;
  }
  return r;
}
long long check(long long x) {
  for (long long l = 1; l <= n; l++) {
    long long r = findr(l, x);
    long long mx = max(L[l - 1].second, R[r + 1].second),
              mn = min(L[l - 1].first, R[r + 1].first);
    if (mx < mn) return 1;
    if ((mx - mn) * (mx - mn) <= x &&
        max(mx * mx, mn * mn) + p[l].first * p[l].first <= x)
      return 1;
  }
  for (long long r = 1; r <= n; r++) {
    long long l = findl(r, x);
    long long mx = max(L[l - 1].second, R[r + 1].second),
              mn = min(L[l - 1].first, R[r + 1].first);
    if (mx < mn) return 1;
    if ((mx - mn) * (mx - mn) <= x &&
        max(mx * mx, mn * mn) + p[r].first * p[r].first <= x)
      return 1;
  }
  return 0;
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) p[i].first = read(), p[i].second = read();
  sort(p + 1, p + n + 1);
  L[0].first = R[n + 1].first = INF, L[0].second = R[n + 1].second = -INF;
  for (long long i = 1; i <= n; i++)
    L[i].first = min(L[i - 1].first, p[i].second),
    L[i].second = max(L[i - 1].second, p[i].second);
  for (long long i = n; i >= 1; i--)
    R[i].first = min(R[i + 1].first, p[i].second),
    R[i].second = max(R[i + 1].second, p[i].second);
  long long l = 0, r = (L[n].second - L[n].first) * (L[n].second - L[n].first);
  while (l < r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  printf("%lld\n", r);
  return 0;
}
