#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
using ll = long long;
int n;
struct Node {
  int x, y;
} a[N];
inline ll sq(ll x) { return x * x; }
int lmin[N], lmax[N], rmin[N], rmax[N];
bool check(ll mid) {
  int cur = 2;
  ll ans = LLONG_MAX;
  for (int i = 1; i <= n && a[i].x <= 0; i++) {
    while (cur <= n && sq(a[cur].x - a[i].x) <= mid &&
           abs(a[cur].x) <= abs(a[i].x))
      ++cur;
    while (abs(a[cur - 1].x) > abs(a[i].x)) --cur;
    int l = INT_MAX, r = INT_MIN;
    if (i > 1) r = max(r, lmax[i - 1]), l = min(l, lmin[i - 1]);
    if (cur <= n) r = max(r, rmax[cur]), l = min(l, rmin[cur]);
    ans = min(ans, max(sq(r - l), max(sq(l), sq(r)) + sq(a[i].x)));
  }
  cur = n - 1;
  for (int i = n; i > 0 && a[i].x >= 0; --i) {
    while (cur && sq(a[cur].x - a[i].x) <= mid && abs(a[cur].x) <= abs(a[i].x))
      --cur;
    while (abs(a[cur + 1].x) > abs(a[i].x)) ++cur;
    int l = INT_MAX, r = INT_MIN;
    if (i < n) r = max(r, rmax[i + 1]), l = min(l, rmin[i + 1]);
    if (cur) r = max(r, lmax[cur]), l = min(l, lmin[cur]);
    ans = min(ans, max(sq(r - l), max(sq(l), sq(r)) + sq(a[i].x)));
  }
  return ans <= mid;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].x >> a[i].y;
  sort(a + 1, a + n + 1, [](Node a, Node b) { return a.x < b.x; });
  lmin[1] = lmax[1] = a[1].y;
  for (int i = 2; i <= n; i++)
    lmin[i] = min(a[i].y, lmin[i - 1]), lmax[i] = max(a[i].y, lmax[i - 1]);
  rmin[n] = rmax[n] = a[n].y;
  for (int i = n - 1; i > 0; --i)
    rmin[i] = min(a[i].y, rmin[i + 1]), rmax[i] = max(a[i].y, rmax[i + 1]);
  ll l = 0, r = min(sq(lmin[n] - lmax[n]), sq(a[1].x - a[n].x)), ans = r;
  while (l <= r) {
    ll mid = (l + r) >> 1;
    if (check(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
