#include <bits/stdc++.h>
using namespace std;
long long qmx[100010], qmn[100010], hmx[100010], hmn[100010], i, j, n, maxy,
    miny, l, r, mid, ans, midx;
struct abc {
  long long x, y;
} a[100010];
bool comp(const abc &a, const abc &b) { return a.x < b.x; }
long long work(long long minx, long long maxx, long long miny, long long maxy) {
  long long d = max(maxx - minx, maxy - miny), x = max(maxx, -minx),
            y = max(maxy, -miny);
  return max(d * d, x * x + y * y);
}
bool check(long long mxd) {
  long long m = sqrt(mxd);
  for (i = j = midx; i; i--) {
    for (; j < n && a[j + 1].x - a[i].x <= m && abs(a[j + 1].x) <= abs(a[i].x);
         ++j)
      ;
    for (; a[j].x - a[i].x > m; --j)
      ;
    if (work(a[i].x, a[j].x, min(qmn[i - 1], hmn[j + 1]),
             max(qmx[i - 1], hmx[j + 1])) <= mxd)
      return 1;
  }
  for (i = j = midx + 1; j <= n; ++j) {
    for (; i > 1 && a[j].x - a[i - 1].x <= m && abs(a[i - 1].x) <= abs(a[j].x);
         --i)
      ;
    for (; a[j].x - a[i].x > m; ++i)
      ;
    if (work(a[i].x, a[j].x, min(qmn[i - 1], hmn[j + 1]),
             max(qmx[i - 1], hmx[j + 1])) <= mxd)
      return 1;
  }
  return 0;
}
int main() {
  scanf("%I64d\n", &n);
  maxy = -1000000000;
  miny = 1000000000;
  for (i = 1; i <= n; ++i) {
    scanf("%I64d%I64d\n", &a[i].x, &a[i].y);
    maxy = max(maxy, a[i].y);
    miny = min(miny, a[i].y);
  }
  sort(a + 1, a + n + 1, comp);
  for (midx = 0; midx < n && a[midx + 1].x <= 0; ++midx)
    ;
  for (i = 1; i <= n; ++i) {
    qmn[i] = min(qmn[i - 1], a[i].y);
    qmx[i] = max(qmx[i - 1], a[i].y);
  }
  for (i = n; i; --i) {
    hmn[i] = min(hmn[i + 1], a[i].y);
    hmx[i] = max(hmx[i + 1], a[i].y);
  }
  l = 0;
  r = min(a[n].x - a[1].x, maxy - miny);
  ans = r = r * r;
  for (; l <= r;) {
    mid = (l + r) >> 1;
    if (check(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%I64d\n", ans);
}
