#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
void precalc() {}
const long long inf = 1.01e18;
const int maxn = 1e5 + 10;
struct pnt {
  long long x[2];
  pnt() {}
  pnt(long long a, long long b) { x[0] = a, x[1] = b; }
};
bool less0(const pnt& p, const pnt& q) { return p.x[0] < q.x[0]; }
bool less1(const pnt& p, const pnt& q) { return p.x[1] < q.x[1]; }
int n;
pnt p[maxn];
bool read() {
  if (scanf("%d", &n) < 1) {
    return false;
  }
  for (int i = 0; i < n; ++i) {
    scanf(
        "%I64d"
        "%I64d",
        &p[i].x[0], &p[i].x[1]);
  }
  return true;
}
pnt q[2][maxn];
long long lmx[2][2][maxn];
long long rmx[2][2][maxn];
bool cool(int it, long long x, long long l, int a, int b) {
  assert(0 <= a && a < b && b <= n);
  if (a == 0 && b == n) {
    return true;
  }
  long long mx = max(lmx[it][0][a], rmx[it][0][b]);
  long long mn = min(lmx[it][1][a], rmx[it][1][b]);
  return max(mx * mx, mn * mn) + x * x <= l && (mx - mn) * (mx - mn) <= l;
}
bool good(long long l) {
  long long sql = sqrt(l);
  while ((sql + 1) * (sql + 1) <= l) {
    sql++;
  }
  while (sql * sql > l) {
    sql--;
  }
  for (int it = 0; it < 2; ++it) {
    for (int i = 0, j = 0; i < n; ++i) {
      long long cx = q[it][i].x[it];
      if (cx > 0) {
        break;
      }
      for (; j < n && q[it][j].x[it] - cx <= sql &&
             abs(q[it][j].x[it]) <= abs(cx);
           ++j)
        ;
      for (; j > i + 1 && abs(q[it][j - 1].x[it]) > abs(cx); --j)
        ;
      if (cool(it, cx, l, i, j)) {
        return true;
      }
    }
    for (int i = n - 1, j = n - 1; i >= 0; --i) {
      long long cx = q[it][i].x[it];
      if (cx < 0) {
        break;
      }
      for (; j >= 0 && cx - q[it][j].x[it] <= sql &&
             abs(q[it][j].x[it]) <= abs(cx);
           --j)
        ;
      for (; j < i - 1 && abs(q[it][j + 1].x[it]) > abs(cx); ++j)
        ;
      if (cool(it, cx, l, j + 1, i + 1)) {
        return true;
      }
    }
  }
  return false;
}
void solve() {
  for (int it = 0; it < 2; ++it) {
    for (int i = 0; i < n; ++i) {
      q[it][i] = p[i];
    }
    sort(q[it], q[it] + n, it ? less1 : less0);
    lmx[it][0][0] = -inf;
    lmx[it][1][0] = inf;
    for (int i = 0; i < n; ++i) {
      lmx[it][0][i + 1] = max(lmx[it][0][i], q[it][i].x[!it]);
      lmx[it][1][i + 1] = min(lmx[it][1][i], q[it][i].x[!it]);
    }
    rmx[it][0][n] = -inf;
    rmx[it][1][n] = inf;
    for (int i = n - 1; i >= 0; --i) {
      rmx[it][0][i] = max(rmx[it][0][i + 1], q[it][i].x[!it]);
      rmx[it][1][i] = min(rmx[it][1][i + 1], q[it][i].x[!it]);
    }
  }
  long long L = -1, R = inf;
  while (R - L > 1) {
    long long M = (L + R) / 2;
    if (good(M)) {
      R = M;
    } else {
      L = M;
    }
  }
  printf(
      "%I64d"
      "\n",
      R);
}
int main() {
  srand(rdtsc());
  precalc();
  while (true) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
