#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7, INF = 0x3f3f3f3f;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long qpow(long long a, long long n) {
  long long r = 1 % P;
  for (a %= P; n; a = a * a % P, n >>= 1)
    if (n & 1) r = r * a % P;
  return r;
}
long long inv(long long first) {
  return first <= 1 ? 1 : inv(P % first) * (P - P / first) % P;
}
inline int rd() {
  int first = 0;
  char p = getchar();
  while (p < '0' || p > '9') p = getchar();
  while (p >= '0' && p <= '9') first = first * 10 + p - '0', p = getchar();
  return first;
}
const int N = 1e6 + 10;
int n;
pair<int, int> a[N];
int Lmin[N], Lmax[N], Rmin[N], Rmax[N];
long long sqr(long long first) { return first * first; }
long long ans = 1e18;
int chk(long long e) {
  if (ans <= e) return 1;
  int now = 1;
  long long ans = 1e17;
  for (int i = 1; i <= n; ++i) {
    while (now < n && sqr(a[now + 1].first - a[i].first) <= e &&
           abs(a[now + 1].first) <= abs(a[i].first))
      ++now;
    while (abs(a[now].first) > abs(a[i].first)) --now;
    int U = -1e9, D = 1e9;
    if (i > 1) U = max(U, Lmax[i - 1]), D = min(D, Lmin[i - 1]);
    if (now < n) U = max(U, Rmax[now + 1]), D = min(D, Rmin[now + 1]);
    ans =
        min(ans, max(sqr(U - D), max(sqr(U), sqr(D)) +
                                     max(sqr(a[i].first), sqr(a[now].first))));
  }
  now = n;
  for (int i = n; i >= 1; --i) {
    while (now > 1 && sqr(a[now - 1].first - a[i].first) <= e &&
           abs(a[now - 1].first) <= abs(a[i].first))
      --now;
    while (abs(a[now].first) > abs(a[i].first)) ++now;
    int U = -1e9, D = 1e9;
    if (i < n) U = max(U, Rmax[i + 1]), D = min(D, Rmin[i + 1]);
    if (now > 1) U = max(U, Lmax[now - 1]), D = min(D, Lmin[now - 1]);
    ans =
        min(ans, max(sqr(U - D), max(sqr(U), sqr(D)) +
                                     max(sqr(a[i].first), sqr(a[now].first))));
  }
  return ans <= e;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &a[i].first, &a[i].second);
  sort(a + 1, a + 1 + n);
  Lmin[1] = Lmax[1] = a[1].second;
  for (int i = 2; i <= n; ++i) {
    Lmin[i] = min(Lmin[i - 1], a[i].second);
    Lmax[i] = max(Lmax[i - 1], a[i].second);
  }
  Rmin[n] = Rmax[n] = a[n].second;
  for (int i = n - 1; i >= 1; --i) {
    Rmin[i] = min(Rmin[i + 1], a[i].second);
    Rmax[i] = max(Rmax[i + 1], a[i].second);
  }
  long long l = 0,
            r = min(sqr(Lmin[n] - Lmax[n]), sqr(a[1].first - a[n].first));
  ans = r;
  while (l <= r) {
    if (chk(((l + r) >> 1)))
      ans = ((l + r) >> 1), r = ((l + r) >> 1) - 1;
    else
      l = ((l + r) >> 1) + 1;
  }
  printf("%lld\n", ans);
}
