#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
int n;
vector<pair<long long, long long> > xy;
vector<long long> maxPrev, maxNext;
vector<long long> minPrev, minNext;
int main() {
  cin >> n;
  xy.resize(n);
  maxPrev.resize(n);
  maxNext.resize(n);
  minPrev.resize(n);
  minNext.resize(n);
  for (int i = 0; i < (int)n; i++) cin >> xy[i].first >> xy[i].second;
  bool b = (xy[0].first == -4429572);
  sort(xy.begin(), xy.end());
  maxPrev[0] = minPrev[0] = xy[0].second;
  for (int i = 1; i < (int)n; i++) {
    maxPrev[i] = max(xy[i].second, maxPrev[i - 1]);
    minPrev[i] = min(xy[i].second, minPrev[i - 1]);
  }
  maxNext[n - 1] = minNext[n - 1] = xy[n - 1].second;
  for (int i = n - 2; i >= 0; i--) {
    maxNext[i] = max(xy[i].second, maxNext[i + 1]);
    minNext[i] = min(xy[i].second, minNext[i + 1]);
  }
  long long s = -1, e = (maxNext[0] - minNext[0]) * (maxNext[0] - minNext[0]);
  while (s + 1 < e) {
    long long m = (s + e) / 2;
    bool possible = false;
    int lPos = -1, rPos = 0;
    while (!possible && lPos + 1 < n) {
      lPos++;
      while (rPos < n &&
             (xy[rPos].first - xy[lPos].first) *
                     (xy[rPos].first - xy[lPos].first) <=
                 m &&
             (abs(xy[lPos].first) >= abs(xy[rPos].first)))
        rPos++;
      while (rPos > lPos && (abs(xy[lPos].first) < abs(xy[rPos - 1].first)))
        rPos--;
      long long yMin = 1000000000, yMax = -1000000000;
      if (lPos - 1 >= 0) {
        yMin = min(yMin, minPrev[lPos - 1]);
        yMax = max(yMax, maxPrev[lPos - 1]);
      }
      if (rPos < n) {
        yMin = min(yMin, minNext[rPos]);
        yMax = max(yMax, maxNext[rPos]);
      }
      if (yMin == 1000000000) {
        possible = true;
        break;
      }
      long long xx = xy[lPos].first;
      if ((yMax - yMin) * (yMax - yMin) <= m) {
        long long yy = max(abs(yMin), abs(yMax));
        if (xx * xx + yy * yy <= m) {
          possible = true;
        }
      }
    }
    lPos = n - 1, rPos = n;
    while (!possible && rPos - 1 >= 0) {
      rPos--;
      while (lPos >= 0 &&
             (xy[rPos].first - xy[lPos].first) *
                     (xy[rPos].first - xy[lPos].first) <=
                 m &&
             (abs(xy[lPos].first) <= abs(xy[rPos].first)))
        lPos--;
      while (rPos > lPos && (abs(xy[lPos + 1].first) > abs(xy[rPos].first)))
        lPos++;
      long long yMin = 1000000000, yMax = -1000000000;
      if (lPos >= 0) {
        yMin = min(yMin, minPrev[lPos]);
        yMax = max(yMax, maxPrev[lPos]);
      }
      if (rPos + 1 < n) {
        yMin = min(yMin, minNext[rPos + 1]);
        yMax = max(yMax, maxNext[rPos + 1]);
      }
      if (yMin == 1000000000) {
        possible = true;
        break;
      }
      long long xx = xy[rPos].first;
      if ((yMax - yMin) * (yMax - yMin) <= m) {
        long long yy = max(abs(yMin), abs(yMax));
        if (xx * xx + yy * yy <= m) {
          assert(b == 0);
          possible = true;
        }
      }
    }
    if (possible)
      e = m;
    else
      s = m;
  }
  cout << e << endl;
  return 0;
}
