#include <bits/stdc++.h>
using namespace std;
long long sq(long long first) { return first * first; }
pair<int, int> p[100005];
int n;
vector<tuple<int, int, int> > f, g;
void go(vector<tuple<int, int, int> > &v, bool z) {
  int mx = -int(1e9), mn = int(1e9);
  for (int i = (0); i < (n); i++)
    if (p[i].first < 0 || (z && p[i].first == 0)) {
      if (i == 0 || p[i].first != p[i - 1].first) {
        v.emplace_back(-p[i].first, mn, mx);
      }
      mn = min(mn, p[i].second);
      mx = max(mx, p[i].second);
    }
}
vector<tuple<int, int, int> > ff, gg;
pair<int, int> tv[10];
int stv;
long long calc(tuple<int, int, int> a, tuple<int, int, int> b) {
  stv = 0;
  int first, mny, mxy;
  tie(first, mny, mxy) = a;
  first *= -1;
  if (abs(first) != int(1e9)) tv[stv++] = make_pair(first, 0);
  if (abs(mny) != int(1e9)) tv[stv++] = make_pair(0, mny);
  if (abs(mxy) != int(1e9)) tv[stv++] = make_pair(0, mxy);
  tie(first, mny, mxy) = b;
  if (abs(first) != int(1e9)) tv[stv++] = make_pair(first, 0);
  if (abs(mny) != int(1e9)) tv[stv++] = make_pair(0, mny);
  if (abs(mxy) != int(1e9)) tv[stv++] = make_pair(0, mxy);
  long long csqd = 0;
  for (int i = (0); i < (stv); i++)
    for (int j = (0); j < (stv); j++) {
      csqd = max(csqd, sq(tv[i].first - tv[j].first) +
                           sq(tv[i].second - tv[j].second));
    }
  return csqd;
}
long long rt(long long first) {
  if (first < 0) return -1;
  long long d = floor(sqrt(first));
  long long a = 0;
  for (a = max(d - 2, 0ll); a * a <= first; a++)
    ;
  return a - 1;
}
bool can(long long sqd) {
  ff.clear();
  gg.clear();
  for (auto t : f) {
    if (calc(t, make_tuple(-int(1e9), int(1e9), -int(1e9))) <= sqd)
      ff.push_back(t);
  }
  for (auto t : g) {
    if (calc(t, make_tuple(-int(1e9), int(1e9), -int(1e9))) <= sqd)
      gg.push_back(t);
  }
  for (auto t : ff) {
    int first, mny, mxy;
    tie(first, mny, mxy) = t;
    long long mxx = rt(sqd) - first;
    if (abs(mny) != int(1e9)) {
      mxx = min(mxx, rt(sqd - sq(mny)));
    }
    if (abs(mxy) != int(1e9)) {
      mxx = min(mxx, rt(sqd - sq(mxy)));
    }
    int j = lower_bound(gg.begin(), gg.end(),
                        make_tuple(mxx + 1, -int(1e9) - 1, -int(1e9) - 1)) -
            gg.begin();
    j--;
    if (j >= 0 && calc(t, gg[j]) <= sqd) return true;
  }
  return false;
}
long long ans;
void spec() {
  int mx = -int(1e9), mn = int(1e9);
  for (int i = (0); i < (n); i++)
    if (p[i].first > 0) {
      mn = min(mn, p[i].second);
      mx = max(mx, p[i].second);
    }
  int mxx = -int(1e9);
  for (int i = (0); i < (n); i++)
    if (p[i].first <= 0) mxx = max(mxx, p[i].first);
  for (int i = (0); i < (n); i++)
    if (p[i].first <= 0) {
      int mnx = p[i].first;
      long long csqd = calc(make_tuple(mnx, mn, mx), make_tuple(-mxx, mn, mx));
      ans = min(ans, csqd);
      mn = min(mn, p[i].second);
      mx = max(mx, p[i].second);
    }
}
int main() {
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) scanf("%d %d", &p[i].first, &p[i].second);
  int mny = int(1e9), mxy = -int(1e9);
  for (int i = (0); i < (n); i++) mny = min(mny, p[i].second);
  for (int i = (0); i < (n); i++) mxy = max(mxy, p[i].second);
  ans = sq(mxy - mny);
  sort(p, p + n);
  spec();
  go(f, false);
  reverse(p, p + n);
  for (int i = (0); i < (n); i++) p[i].first *= -1;
  spec();
  go(g, true);
  sort(f.begin(), f.end());
  sort(g.begin(), g.end());
  long long s = 0, e = ans - 1, b = ans;
  while (s <= e) {
    long long md = (s + e) / 2;
    if (can(md)) {
      b = md;
      e = md - 1;
    } else {
      s = md + 1;
    }
  }
  printf("%lld\n", b);
}
