#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > A;
vector<pair<int, int> > B, C;
long long int L1[100005], R1[100005];
long long int L2[100005], R2[100005];
int n;
bool check(long long int x) {
  int to = 0;
  for (int i = 0; i < n; i++) {
    L1[i] = 100000000000000000LL;
    R1[i] = -100000000000000000LL;
    if (i > 0) {
      L1[i] = min(L1[i], min(L1[i - 1], (long long int)A[i - 1].second));
      R1[i] = max(R1[i], max(R1[i - 1], (long long int)A[i - 1].second));
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    L2[i] = 100000000000000000LL;
    R2[i] = -100000000000000000LL;
    if (i + 1 < n) {
      L2[i] = min(L2[i], min(L2[i + 1], (long long int)A[i + 1].second));
      R2[i] = max(R2[i], max(R2[i + 1], (long long int)A[i + 1].second));
    }
  }
  for (int i = 0; i < n; i++) {
    while (to < n && (long long int)(A[i].first - A[to].first) *
                             (long long int)(A[i].first - A[to].first) <=
                         x)
      to++;
    if (i == 0 && to == n) return true;
    long long int l = min(L1[i], L2[to - 1]);
    long long int r = max(R1[i], R2[to - 1]);
    long long int mx = max(abs(A[i].first), abs(A[to - 1].first));
    long long int D = max(abs(l), abs(r));
    if ((r - l) * (r - l) <= x && mx * mx + D * D <= x) return true;
  }
  int l = B.size(), r = C.size();
  l--;
  r--;
  long long int low = 100000000000000000LL, up = -100000000000000000LL;
  for (int i = 0; i < n; i++) {
    if (l < 0 || (r >= 0 && C[r].first >= B[l].first)) {
      long long int x = C[r--].second;
      low = min(low, x);
      up = max(up, x);
    } else {
      long long int x = B[l--].second;
      low = min(low, x);
      up = max(up, x);
    }
    long long int b = 0, c = 0;
    if (l >= 0) b = B[l].first;
    if (r >= 0) c = -C[r].first;
    if ((b - c) * (b - c) <= x && (up - low) * (up - low) <= x &&
        (i == n - 1 || max(low * low, up * up) + max(b * b, c * c) <= x))
      return true;
  }
  return false;
}
long long int solve() {
  long long int l = -1, r = 100000000000000000LL;
  while (l + 1 < r) {
    long long int m = (l + r) / 2;
    if (check(m))
      r = m;
    else
      l = m;
  }
  return r;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    A.push_back(pair<int, int>(x, y));
    if (x > 0)
      B.push_back(pair<int, int>(x, y));
    else
      C.push_back(pair<int, int>(-x, y));
  }
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  sort(C.begin(), C.end());
  long long int ret = solve();
  for (int i = 0; i < n; i++) A[i].first = -A[i].first;
  sort(A.begin(), A.end());
  swap(B, C);
  ret = min(ret, solve());
  printf("%lld\n", ret);
  return 0;
}
