#include <bits/stdc++.h>
using namespace std;
long long t, n, m, u, v, q, r, ql, qr, k, l, s, w, h, c, d, f;
const int N = 1e5 + 500;
const long long mod = 1e9 + 7;
const long long INF = 1LL << 61LL;
const bool JUDGE = false;
long long x[N], y[N];
pair<long long, long long> pt[N];
long long suffmax[N], prefmax[N];
long long suffmin[N], prefmin[N];
long long dist(pair<long long, long long> x, pair<long long, long long> y) {
  long long ret = (x.first - y.first) * (x.first - y.first);
  ret += (x.second - y.second) * (x.second - y.second);
  return ret;
}
long long d2(pair<long long, long long> x, pair<long long, long long> y) {
  long long ret = (x.first - y.first) * (x.first - y.first);
  return ret;
}
long long d3(pair<long long, long long> x, pair<long long, long long> y) {
  long long ret = (x.second - y.second) * (x.second - y.second);
  return ret;
}
bool solve(long long maxd) {
  int l = 1, r = 1;
  while (l <= n) {
    if (pt[l].first > 0) return false;
    if (r < l) r = l;
    while (r < n && d2(pt[l], pt[r + 1]) <= maxd &&
           abs(pt[l].first) >= abs(pt[r + 1].first))
      r++;
    pair<long long, long long> cy =
        make_pair(0LL, max(suffmax[r + 1], prefmax[l - 1]));
    pair<long long, long long> cx =
        make_pair(0LL, min(suffmin[r + 1], prefmin[l - 1]));
    if (l == 1 && r == n) return true;
    if (d3(cx, cy) > maxd) {
      l++;
      continue;
    }
    if (dist(cx, make_pair(pt[l].first, 0LL)) > maxd ||
        dist(cy, make_pair(pt[l].first, 0LL)) > maxd) {
      l++;
      continue;
    }
    if (dist(cx, make_pair(pt[r].first, 0LL)) > maxd ||
        dist(cy, make_pair(pt[r].first, 0LL)) > maxd) {
      l++;
      continue;
    }
    return true;
  }
  return false;
}
long long solve() {
  suffmax[n + 1] = -INF;
  suffmin[n + 1] = INF;
  for (int i = n; i >= 1; --i) {
    suffmax[i] = max(suffmax[i + 1], pt[i].second);
    suffmin[i] = min(suffmin[i + 1], pt[i].second);
  }
  prefmax[0] = -INF;
  prefmin[0] = INF;
  for (int i = 1; i <= n; ++i) {
    prefmax[i] = max(prefmax[i - 1], pt[i].second);
    prefmin[i] = min(prefmin[i - 1], pt[i].second);
  }
  long long lo = 0, hi = INF;
  while (lo < hi) {
    long long m = (lo + hi) / 2LL;
    if (solve(m))
      hi = m;
    else
      lo = m + 1;
  }
  return lo;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (JUDGE) {
    freopen("angry.in", "r", stdin);
    freopen("angry.out", "w", stdout);
  }
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> x[i] >> y[i];
    pt[i] = make_pair(x[i], y[i]);
  }
  sort(pt + 1, pt + 1 + n);
  long long ans = solve();
  for (int i = 1; i <= n; ++i) pt[i].first = -pt[i].first;
  sort(pt + 1, pt + 1 + n);
  ans = min(ans, solve());
  for (int i = 1; i <= n; ++i) {
    pt[i].first = -pt[i].first;
    swap(pt[i].first, pt[i].second);
  }
  sort(pt + 1, pt + 1 + n);
  ans = min(ans, solve());
  for (int i = 1; i <= n; ++i) pt[i].first = -pt[i].first;
  sort(pt + 1, pt + 1 + n);
  ans = min(ans, solve());
  cout << ans << '\n';
  return 0;
}
