#include <bits/stdc++.h>
using namespace std;
int n;
int x[100005], y[100005];
pair<int, int> p[100005];
int pref_mnY[100005], pref_mxY[100005];
int suff_mnY[100005], suff_mxY[100005];
long long dist(long long x) { return x * x; }
bool check(long long d) {
  if (dist(p[n].first - p[1].first) <= d ||
      dist(pref_mxY[n] - pref_mnY[n]) <= d)
    return 1;
  int q = n + 1;
  for (int i = 1; i <= n; i++) {
    if (p[i].first >= 0) {
      q = i;
      break;
    }
  }
  for (int i = 1; i <= q - 1; i++) {
    int lo = i, hi = n, r = 0;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      if (dist(p[i].first - p[mid].first) <= d &&
          abs(p[i].first) >= abs(p[mid].first))
        r = mid, lo = mid + 1;
      else
        hi = mid - 1;
    }
    int mn = min(pref_mnY[i - 1], suff_mnY[r + 1]);
    int mx = max(pref_mxY[i - 1], suff_mxY[r + 1]);
    if (mn * 1ll * mn + p[i].first * 1ll * p[i].first <= d &&
        mn * 1ll * mn + p[r].first * 1ll * p[r].first <= d &&
        mx * 1ll * mx + p[i].first * 1ll * p[i].first <= d &&
        mx * 1ll * mx + p[r].first * 1ll * p[r].first <= d &&
        dist(mx - mn) <= d) {
      return 1;
    }
  }
  for (int i = q; i <= n; i++) {
    int lo = 1, hi = i, l = 0;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      if (dist(p[i].first - p[mid].first) <= d &&
          abs(p[i].first) >= abs(p[mid].first))
        l = mid, hi = mid - 1;
      else
        lo = mid + 1;
    }
    int mn = min(pref_mnY[l - 1], suff_mnY[i + 1]);
    int mx = max(pref_mxY[l - 1], suff_mxY[i + 1]);
    if (mn * 1ll * mn + p[i].first * 1ll * p[i].first <= d &&
        mn * 1ll * mn + p[l].first * 1ll * p[l].first <= d &&
        mx * 1ll * mx + p[i].first * 1ll * p[i].first <= d &&
        mx * 1ll * mx + p[l].first * 1ll * p[l].first <= d &&
        dist(mx - mn) <= d) {
      return 1;
    }
  }
  return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    p[i] = make_pair(x[i], y[i]);
  }
  sort(p + 1, p + 1 + n);
  pref_mnY[0] = 1e9, pref_mxY[0] = -1e9;
  suff_mnY[n + 1] = 1e9, suff_mxY[n + 1] = -1e9;
  for (int i = 1; i <= n; i++) {
    pref_mnY[i] = min(pref_mnY[i - 1], p[i].second);
    pref_mxY[i] = max(pref_mxY[i - 1], p[i].second);
  }
  for (int i = n; i >= 1; i--) {
    suff_mnY[i] = min(suff_mnY[i + 1], p[i].second);
    suff_mxY[i] = max(suff_mxY[i + 1], p[i].second);
  }
  long long lo = 0, hi = 1e18, ans = 0;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    if (check(mid))
      ans = mid, hi = mid - 1;
    else
      lo = mid + 1;
  }
  printf("%lld\n", ans);
}
