#include <bits/stdc++.h>
using namespace std;
const long long mxn = 1e5 + 7;
const long long inf = 1e9 + 7;
struct point {
  long long x, y;
} p[mxn];
bool compareX(point a, point b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
bool compareY(point a, point b) {
  if (a.y == b.y) return a.x < b.x;
  return a.y < b.y;
}
long long sufx[2][mxn], prex[2][mxn];
long long sufy[2][mxn], prey[2][mxn], n;
long long sqr(long long x) { return x * x; }
vector<long long> ox, oy;
bool alg(vector<long long>& o, long long i, long long suf[][mxn],
         long long pre[][mxn], long long dis) {
  long long l = sqrt(dis);
  long long idx, d;
  if (dis < sqr(abs(o[i])))
    d = -1;
  else
    d = sqrt(dis - sqr(abs(o[i])));
  long long mx = -inf, mn = inf;
  if (o[i] < 0) {
    idx = upper_bound(o.begin(), o.end(), min(o[i] + l, -o[i])) - o.begin();
    if (idx < n && max(suf[1][idx], -suf[0][idx]) > d)
      return false;
    else if (idx < n) {
      mx = max(mx, suf[1][idx]);
      mn = min(mn, suf[0][idx]);
    }
    if (i > 0 && max(pre[1][i - 1], -pre[0][i - 1]) > d)
      return false;
    else if (i > 0) {
      mx = max(mx, pre[1][i - 1]);
      mn = min(mn, pre[0][i - 1]);
    }
    if (mx - mn > l) return false;
  } else {
    idx = upper_bound(o.begin(), o.end(), max(o[i] - l, -o[i]) - 1) -
          o.begin() - 1;
    if (idx >= 0 && max(pre[1][idx], -pre[0][idx]) > d)
      return false;
    else if (idx >= 0) {
      mx = max(mx, pre[1][idx]);
      mn = min(mn, pre[0][idx]);
    }
    if (i < n - 1 && max(suf[1][i + 1], -suf[0][i + 1]) > d)
      return false;
    else if (i < n - 1) {
      mx = max(mx, suf[1][i + 1]);
      mn = min(mn, suf[0][i + 1]);
    }
    if (mx - mn > l) return false;
  }
  return true;
}
bool valid(long long dis) {
  for (long long i = 0; i < n; ++i)
    if (alg(ox, i, sufy, prey, dis) || alg(oy, i, sufx, prex, dis)) return true;
  return false;
}
void pre() {
  sort(p, p + n, compareX);
  for (long long i = 0; i < n; ++i) ox.push_back(p[i].x);
  prey[0][0] = prey[1][0] = p[0].y;
  for (long long i = 1; i < n; ++i) {
    prey[0][i] = min(prey[0][i - 1], p[i].y);
    prey[1][i] = max(prey[1][i - 1], p[i].y);
  }
  sufy[0][n - 1] = sufy[1][n - 1] = p[n - 1].y;
  for (long long i = n - 2; i >= 0; --i) {
    sufy[0][i] = min(sufy[0][i + 1], p[i].y);
    sufy[1][i] = max(sufy[1][i + 1], p[i].y);
  }
  sort(p, p + n, compareY);
  for (long long i = 0; i < n; ++i) oy.push_back(p[i].y);
  prex[0][0] = prex[1][0] = p[0].x;
  for (long long i = 1; i < n; ++i) {
    prex[0][i] = min(prex[0][i - 1], p[i].x);
    prex[1][i] = max(prex[1][i - 1], p[i].x);
  }
  sufx[0][n - 1] = sufx[1][n - 1] = p[n - 1].x;
  for (long long i = n - 2; i >= 0; --i) {
    sufx[0][i] = min(sufx[0][i + 1], p[i].x);
    sufx[1][i] = max(sufx[1][i + 1], p[i].x);
  }
}
int32_t main() {
  cin >> n;
  for (long long i = 0; i < n; ++i) cin >> p[i].x >> p[i].y;
  pre();
  long long lo = -1, hi = 1e18;
  while (hi - lo > 1) {
    long long mid = (lo + hi) / 2;
    if (valid(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << hi << "\n";
}
