#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(10);
  int N;
  cin >> N;
  vector<pair<long long, long long> > P(N);
  for (int i = 0; i < N; i++) cin >> P[i].first >> P[i].second;
  sort(begin(P), end(P));
  vector<long long> miL(N + 1, 1e9), mxL(N + 1, -1e9), miR(N + 1, 1e9),
      mxR(N + 1, -1e9);
  for (int i = 0; i < N; i++) {
    miL[i + 1] = min(miL[i], P[i].second);
    mxL[i + 1] = max(mxL[i], P[i].second);
  }
  for (int i = N - 1; i >= 0; i--) {
    miR[i] = min(miR[i + 1], P[i].second);
    mxR[i] = max(mxR[i + 1], P[i].second);
  }
  long long ans0 =
      min((P[N - 1].first - P[0].first) * (P[N - 1].first - P[0].first),
          (mxL[N] - miL[N]) * (mxL[N] - miL[N]));
  long long ansA = -1, ansB = ans0;
  while (ansB - ansA > 1) {
    long long ansC = (ansA + ansB) / 2;
    int a = 0, b = 0;
    bool ok = false;
    for (int i = 0; i < N; i++) {
      while (((P[i].first - P[a].first) * (P[i].first - P[a].first)) > ansC)
        a++;
      while (P[i].first > 0 && -P[b].first > P[i].first) b++;
      while (P[i].first > 0 && b > 0 && -P[b - 1].first <= P[i].first) b--;
      int c = max(a, b);
      long long miy = min(miL[c], miR[i + 1]);
      long long mxy = max(mxL[c], mxR[i + 1]);
      if (((mxy - miy) * (mxy - miy)) <= ansC)
        if (((max(((mxy < 0) ? -(mxy) : mxy), ((miy < 0) ? -(miy) : miy))) *
             (max(((mxy < 0) ? -(mxy) : mxy), ((miy < 0) ? -(miy) : miy)))) +
                ((max(((P[i].first < 0) ? -(P[i].first) : P[i].first),
                      ((P[c].first < 0) ? -(P[c].first) : P[c].first))) *
                 (max(((P[i].first < 0) ? -(P[i].first) : P[i].first),
                      ((P[c].first < 0) ? -(P[c].first) : P[c].first)))) <=
            ansC) {
          ok = true;
          break;
        }
    }
    a = b = N - 1;
    if (!ok)
      for (int i = N - 1; i >= 0; i--) {
        while (((P[i].first - P[a].first) * (P[i].first - P[a].first)) > ansC)
          a--;
        while (P[i].first < 0 && P[b].first > -P[i].first) b--;
        while (P[i].first < 0 && b < N - 1 && P[b + 1].first <= -P[i].first)
          b++;
        int c = min(a, b);
        long long miy = min(miR[c + 1], miL[i]);
        long long mxy = max(mxR[c + 1], mxL[i]);
        if (((mxy - miy) * (mxy - miy)) <= ansC)
          if (((max(((mxy < 0) ? -(mxy) : mxy), ((miy < 0) ? -(miy) : miy))) *
               (max(((mxy < 0) ? -(mxy) : mxy), ((miy < 0) ? -(miy) : miy)))) +
                  ((max(((P[i].first < 0) ? -(P[i].first) : P[i].first),
                        ((P[c].first < 0) ? -(P[c].first) : P[c].first))) *
                   (max(((P[i].first < 0) ? -(P[i].first) : P[i].first),
                        ((P[c].first < 0) ? -(P[c].first) : P[c].first)))) <=
              ansC) {
            ok = true;
            break;
          }
      }
    if (ok)
      ansB = ansC;
    else
      ansA = ansC;
  }
  cout << ansB << "\n";
  return 0;
}
