#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using plxl = pair<long long, long long>;
const long long inf = 1000000000;
const long long mod = 1e9 + 3;
plxl a[100010];
plxl lft[100010], rht[100010];
bool f(int n, long long mid) {
  for (int i = 1; i <= n; i++) {
    int dir = (a[i].first < 0) ? 1 : -1;
    int lo = 0;
    int hi = n;
    int j;
    while (lo <= hi) {
      int m = (lo + hi) >> 1;
      int tmp = i + dir * m;
      if (tmp < 1 || tmp > n)
        hi = m - 1;
      else if ((abs(a[tmp].first) <= abs(a[i].first)) &&
               ((a[tmp].first - a[i].first) * (a[tmp].first - a[i].first) <=
                mid)) {
        lo = m + 1;
        j = tmp;
      } else {
        hi = m - 1;
      }
    }
    int b = min(i, j), e = max(i, j);
    if (b == 1 && e == n) return true;
    long long mny = min(lft[b - 1].first, rht[e + 1].first);
    long long mxy = max(lft[b - 1].second, rht[e + 1].second);
    if (((mxy - mny) * (mxy - mny) <= mid) &&
        (((a[i].first * a[i].first) + (mny * mny)) <= mid) &&
        (((a[i].first * a[i].first) + (mxy * mxy))) <= mid)
      return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      cin >> a[i].first >> a[i].second;
    }
    sort(a + 1, a + n + 1);
    lft[0] = {inf, -inf};
    for (int i = 1; i <= n; i++) {
      lft[i].first = min(lft[i - 1].first, a[i].second);
      lft[i].second = max(lft[i - 1].second, a[i].second);
    }
    rht[n + 1] = {inf, -inf};
    for (int i = n; i >= 1; i--) {
      rht[i].first = min(rht[i + 1].first, a[i].second);
      rht[i].second = max(rht[i + 1].second, a[i].second);
    }
    long long ans =
        min((lft[n].first - lft[n].second) * (lft[n].first - lft[n].second),
            (a[1].first - a[n].first) * (a[1].first - a[n].first));
    long long lo = 0, hi = ans;
    while (lo <= hi) {
      long long mid = (lo + hi) >> 1LL;
      if (f(n, mid)) {
        hi = mid - 1LL;
        ans = mid;
      } else {
        lo = mid + 1LL;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
