#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n;
pair<int, int> a[N], pre[N], suf[N];
long long X[N], Y[N], ans;
long long sqr(long long x) { return x * x; }
long long width(long long *a) {
  return *max_element(a + 1, a + n + 1) - *min_element(a + 1, a + n + 1);
}
int Lound(int x, int y, long long up) {
  int l = 1, r = x;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (abs(a[mid].first) <= y && sqr(a[mid].first - a[x].first) <= up)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return r + 1;
}
int Round(int x, int y, long long up) {
  int l = x, r = n;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (abs(a[mid].first) <= y && sqr(a[mid].first - a[x].first) <= up)
      l = mid + 1;
    else
      r = mid - 1;
  }
  return l - 1;
}
long long ABS(long long x) {
  if (abs(x) <= (long long)1e8) return abs(x);
  return 0;
}
long long ABS(pair<int, int> x) { return max(ABS(x.first), ABS(x.second)); }
bool check(long long mid) {
  for (int i = 1; i <= n; ++i) {
    if (a[i].first >= 0) {
      int l = Lound(i, a[i].first, mid);
      int m = max(ABS(pre[l - 1]), ABS(suf[i + 1]));
      int mx = max(pre[l - 1].first, suf[i + 1].first);
      int mn = min(pre[l - 1].second, suf[i + 1].second);
      if (sqr(m) + sqr(a[i].first) <= mid && sqr(max(0, mx - mn)) <= mid) {
        return 1;
      }
    } else {
      int r = Round(i, -a[i].first, mid);
      int m = max(ABS(pre[i - 1]), ABS(suf[r + 1]));
      int mx = max(pre[i - 1].first, suf[r + 1].first);
      int mn = min(pre[i - 1].second, suf[r + 1].second);
      if (sqr(m) + sqr(a[i].first) <= mid && sqr(max(0, mx - mn)) <= mid) {
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i)
    scanf("%d%d", &a[i].first, &a[i].second), X[i] = a[i].first,
                                              Y[i] = a[i].second;
  ans = sqr(min(width(Y), width(X)));
  sort(a + 1, a + n + 1);
  pre[0] = suf[n + 1] = make_pair(-2e8, 2e8);
  for (int i = 1; i <= n; ++i)
    pre[i] = make_pair(max(pre[i - 1].first, a[i].second),
                       min(pre[i - 1].second, a[i].second));
  for (int i = n; i >= 1; --i)
    suf[i] = make_pair(max(suf[i + 1].first, a[i].second),
                       min(suf[i + 1].second, a[i].second));
  long long l = 0, r = 1e18, res = -1;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      r = (res = mid) - 1;
    else
      l = mid + 1;
  }
  if (~res) ans = min(ans, res);
  printf("%lld\n", ans);
  return 0;
}
