#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long k = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    k = k * 10 + ch - '0';
    ch = getchar();
  }
  return k * f;
}
struct D {
  long long x, y;
} a[100010];
inline bool cmp(D a, D b) { return a.x == b.x ? a.y < b.y : a.x < b.x; }
long long n, maxx = -1e9, maxy = -1e9, minx = 1e9, miny = 1e9;
long long lmi[100010], rmi[100010], lma[100010], rma[100010];
inline long long sqr(long long x) { return x * x; }
inline bool check(long long x) {
  long long p = 1;
  for (long long i = 1; i <= n; i++) {
    while (p < n && sqr(a[p + 1].x - a[i].x) <= x &&
           abs(a[p + 1].x) <= abs(a[i].x))
      p++;
    while (abs(a[p].x) > abs(a[i].x)) p--;
    long long A = min(lmi[i - 1], rmi[p + 1]), B = max(lma[i - 1], rma[p + 1]);
    if (sqr(A - B) <= x && sqr(a[i].x) + max(sqr(A), sqr(B)) <= x) return 1;
  }
  p = n;
  for (long long i = n; i; i--) {
    while (p > 1 && sqr(a[i].x - a[p - 1].x) <= x &&
           abs(a[p - 1].x) <= abs(a[i].x))
      p--;
    while (abs(a[p].x) > abs(a[i].x)) p++;
    long long A = min(lmi[p - 1], rmi[i + 1]), B = max(lma[p - 1], rma[i + 1]);
    if (sqr(A - B) <= x && sqr(a[i].x) + max(sqr(A), sqr(B)) <= x) return 1;
  }
  return 0;
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) {
    a[i].x = read();
    a[i].y = read();
    maxx = max(maxx, a[i].x);
    maxy = max(maxy, a[i].y);
    minx = min(minx, a[i].x);
    miny = min(miny, a[i].y);
  }
  sort(a + 1, a + n + 1, cmp);
  lma[0] = -1e9;
  lmi[0] = 1e9;
  for (long long i = 1; i <= n; i++) {
    lma[i] = max(lma[i - 1], a[i].y);
    lmi[i] = min(lmi[i - 1], a[i].y);
  }
  rma[n + 1] = -1e9;
  rmi[n + 1] = 1e9;
  for (long long i = n; i; i--) {
    rma[i] = max(rma[i + 1], a[i].y);
    rmi[i] = min(rmi[i + 1], a[i].y);
  }
  long long l = 0, r = min(sqr(maxx - minx), sqr(maxy - miny)), ans = r;
  while (l <= r) {
    long long mid = l + r >> 1;
    if (check(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%lld", ans);
  return 0;
}
