#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mn = 1e5 + 5;
const ll vc = 1e18;
pair<ll, ll> a[mn];
ll n, lmn[mn], lmx[mn], rmn[mn], rmx[mn], ans;
ll sq(ll x) { return 1ll * x * x; }
void init() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i].first >> a[i].second;
  sort(a + 1, a + n + 1);
  lmx[0] = -vc, lmn[0] = vc;
  for (int i = 1; i <= n; ++i) {
    lmn[i] = min(lmn[i - 1], a[i].second);
    lmx[i] = max(lmx[i - 1], a[i].second);
  }
  rmx[n + 1] = -vc, rmn[n + 1] = vc;
  for (int i = n; i >= 1; --i) {
    rmn[i] = min(rmn[i + 1], a[i].second);
    rmx[i] = max(rmx[i + 1], a[i].second);
  }
  ans = sq(lmx[n] - lmn[n]);
}
bool check(ll m) {
  for (int i = 1, j = 1, k = n; a[i].first < 0, i < n; ++i) {
    while (sq(a[i].first - a[j].first) <= m && j <= n) j += 1;
    while (abs(a[i].first) < abs(a[k].first) && k) k -= 1;
    int u = min(j, k + 1);
    ll x = min(lmn[i - 1], rmn[u]);
    ll y = max(lmx[i - 1], rmx[u]);
    if (sq(x - y) <= m && sq(a[i].first) + sq(max(abs(x), abs(y))) <= m)
      return 1;
  }
  for (int i = n, j = n, k = 1; a[i].first >= 0, i > 0; --i) {
    while (sq(a[i].first - a[j].first) <= m && j) j -= 1;
    while (abs(a[i].first) < abs(a[k].first) && k <= n) k += 1;
    int u = max(j, k - 1);
    ll x = min(rmn[i + 1], lmn[u]);
    ll y = max(rmx[i + 1], lmx[u]);
    if (sq(x - y) <= m && sq(a[i].first) + sq(max(abs(x), abs(y))) <= m)
      return 1;
  }
  return 0;
}
void work() {
  ll l = 0, r = ans;
  while (r - l > 1) {
    ll mid = (l + r) / 2;
    if (check(mid)) {
      ans = min(ans, mid);
      r = mid;
    } else
      l = mid + 1;
  }
  if (ans && check(ans - 1))
    cout << ans - 1 << endl;
  else
    cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  init();
  work();
  return 0;
}
