#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
struct pi {
  int x, y;
} pp[maxn];
int cmp(pi a, pi b) { return a.x < b.x; }
int s[maxn], s1[maxn];
int w[maxn], w1[maxn];
int main() {
  int i, n;
  cin >> n;
  for (i = 0; i < n; i++) scanf("%d%d", &pp[i].x, &pp[i].y);
  sort(pp, pp + n, cmp);
  s[n - 1] = pp[n - 1].y;
  w[n - 1] = pp[n - 1].y;
  for (i = n - 2; i >= 0; i--) {
    s[i] = max(s[i + 1], pp[i].y);
    w[i] = min(w[i + 1], pp[i].y);
  }
  s1[0] = w1[0] = pp[0].y;
  for (i = 1; i < n; i++) {
    s1[i] = max(s1[i - 1], pp[i].y);
    w1[i] = min(w1[i - 1], pp[i].y);
  }
  long long le = 0,
            ri = (long long)(pp[n - 1].x - pp[0].x) * (pp[n - 1].x - pp[0].x) -
                 1,
            mid;
  while (le <= ri) {
    mid = (le + ri) / 2;
    int f = 0;
    for (i = 0; i < n; i++) {
      if ((long long)pp[i].x * pp[i].x > mid) {
        continue;
      }
      if (pp[i].x < 0) {
        int ww = min(abs(pp[i].x), ((int)sqrt(mid)) - abs(pp[i].x));
        int l1 = i, r1 = n - 1, m1;
        while (l1 <= r1) {
          m1 = (l1 + r1) / 2;
          if (pp[m1].x <= ww)
            l1 = m1 + 1;
          else
            r1 = m1 - 1;
        }
        int x1 = -1000000000, y1 = 1000000000;
        if (i) {
          x1 = max(x1, s1[i - 1]);
          y1 = min(y1, w1[i - 1]);
        }
        if (r1 < n - 1) {
          x1 = max(x1, s[r1 + 1]);
          y1 = min(y1, w[r1 + 1]);
        }
        if ((long long)(x1 - y1) * (x1 - y1) > mid) continue;
        if (max((long long)x1 * x1, (long long)y1 * y1) +
                (long long)pp[i].x * pp[i].x <=
            mid) {
          f = 1;
          break;
        }
      } else {
        int ww = min(abs(pp[i].x), ((int)sqrt(mid)) - abs(pp[i].x));
        ww = -ww;
        int l1 = 0, r1 = i, m1;
        while (l1 <= r1) {
          m1 = (l1 + r1) / 2;
          if (pp[m1].x >= ww)
            r1 = m1 - 1;
          else
            l1 = m1 + 1;
        }
        int x1 = -1000000000, y1 = 1000000000;
        if (i < n - 1) {
          x1 = max(x1, s[i + 1]);
          y1 = min(y1, w[i + 1]);
        }
        if (l1) {
          x1 = max(x1, s1[l1 - 1]);
          y1 = min(y1, w1[l1 - 1]);
        }
        if ((long long)(x1 - y1) * (x1 - y1) > mid) continue;
        if (max((long long)x1 * x1, (long long)y1 * y1) +
                (long long)pp[i].x * pp[i].x <=
            mid) {
          f = 1;
          break;
        }
      }
    }
    if (f)
      ri = mid - 1;
    else
      le = mid + 1;
  }
  le = min(le, (long long)(pp[n - 1].x - pp[0].x) * (pp[n - 1].x - pp[0].x));
  int w = 1000000000;
  for (i = 0; i < n; i++) {
    w = min(w, pp[i].y);
  }
  le = min(le, (long long)(s[0] - w) * (s[0] - w));
  cout << le << endl;
}
