#include <bits/stdc++.h>
using namespace std;
int n, pre_min[100100], pre_max[100100], suf_min[100100], suf_max[100100];
struct point {
  int x, y;
  bool operator<(const point &rhs) const { return x < rhs.x; }
} p[100100];
long long sqr(long long x) { return x * x; }
bool judge(long long lim) {
  for (int i = 1, j = 1; i <= n; i++) {
    if (p[i].x > 0) break;
    while (j < n && sqr(p[j + 1].x - p[i].x) <= lim &&
           abs(p[j + 1].x) <= abs(p[i].x))
      j++;
    while (abs(p[j].x) > abs(p[i].x)) j--;
    int mny = min(pre_min[i - 1], suf_min[j + 1]);
    int mxy = max(pre_max[i - 1], suf_max[j + 1]);
    if (sqr(mxy - mny) <= lim &&
        sqr(p[i].x) + sqr(max(abs(mny), abs(mxy))) <= lim)
      return 1;
  }
  for (int i = n, j = n; i; i--) {
    if (p[i].x < 0) break;
    while (j > 1 && sqr(p[j - 1].x - p[i].x) <= lim &&
           abs(p[j - 1].x) <= abs(p[i].x))
      j--;
    while (abs(p[j].x) > abs(p[i].x)) j++;
    int mny = min(suf_min[i + 1], pre_min[j - 1]);
    int mxy = max(suf_max[i + 1], pre_max[j - 1]);
    if (sqr(mxy - mny) <= lim &&
        sqr(p[i].x) + sqr(max(abs(mny), abs(mxy))) <= lim)
      return 1;
  }
  return 0;
}
int main() {
  int mny = 1e9, mxy = -1e9;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &p[i].x, &p[i].y), mny = min(mny, p[i].y),
                                     mxy = max(mxy, p[i].y);
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++)
    pre_min[i] = min(pre_min[i - 1], p[i].y),
    pre_max[i] = max(pre_max[i - 1], p[i].y);
  for (int i = n; i >= 1; i--)
    suf_min[i] = min(suf_min[i + 1], p[i].y),
    suf_max[i] = max(suf_max[i + 1], p[i].y);
  long long l = -1, r = min(sqr(p[1].x - p[n].x), sqr(mny - mxy)), ans = r;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (judge(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%I64d\n", ans);
}
