#include <bits/stdc++.h>
using namespace std;
int n;
pair<long long, long long> a[212345];
long long mxy1[212345], mny1[212345], mxm1[212345];
long long mxy2[212345], mny2[212345], mxm2[212345];
long long power(long long a, long long b) { return a * a; }
long long bins(long long l, long long r) {
  if (l == r) return l;
  long long m = (l + r) >> 1;
  pair<long long, long long> tmp;
  int i, j;
  long long dist, mxy, mny, mxm;
  bool poss = 0;
  long long rt = sqrt(m);
  if (rt * rt > m) --rt;
  for (i = 0; i < n; ++i) {
    if (a[i].first > 0) break;
    tmp.first = min(abs(a[i].first), a[i].first + rt);
    tmp.second = +1000000000000000000ll;
    j = upper_bound(a, a + n, tmp) - a;
    --j;
    if (i == 0 && j == n - 1) {
      poss = 1;
      break;
    }
    mxy = -1000000000;
    mny = 1000000000;
    mxm = 0;
    if (i > 0) {
      mxy = max(mxy, mxy1[i - 1]);
      mny = min(mny, mny1[i - 1]);
      mxm = max(mxm, mxm1[i - 1]);
    }
    if (j < n - 1) {
      mxy = max(mxy, mxy2[j + 1]);
      mny = min(mny, mny2[j + 1]);
      mxm = max(mxm, mxm2[j + 1]);
    }
    dist = (long long)power(mxy - mny, 2);
    dist = max(dist, mxm * mxm + a[i].first * a[i].first);
    if (dist <= m) {
      poss = 1;
      break;
    }
  }
  for (j = n - 1; j >= 0; --j) {
    if (a[j].first < 0) break;
    tmp.first = max(-abs(a[j].first), a[j].first - rt);
    tmp.second = -1000000000000000000ll;
    i = lower_bound(a, a + n, tmp) - a;
    if (i == 0 && j == n - 1) {
      poss = 1;
      break;
    }
    mxy = -1000000000;
    mny = 1000000000;
    mxm = 0;
    if (i > 0) {
      mxy = max(mxy, mxy1[i - 1]);
      mny = min(mny, mny1[i - 1]);
      mxm = max(mxm, mxm1[i - 1]);
    }
    if (j < n - 1) {
      mxy = max(mxy, mxy2[j + 1]);
      mny = min(mny, mny2[j + 1]);
      mxm = max(mxm, mxm2[j + 1]);
    }
    dist = (long long)power(mxy - mny, 2);
    dist = max(dist, mxm * mxm + a[j].first * a[j].first);
    if (dist <= m) {
      poss = 1;
      break;
    }
  }
  if (poss) return bins(l, m);
  return bins(m + 1, r);
}
void solve() {
  scanf("%d", &n);
  int i;
  for (i = 0; i < n; ++i) {
    scanf("%lld", &a[i].first);
    scanf("%lld", &a[i].second);
  }
  sort(a, a + n);
  i = 0;
  mxy1[i] = a[i].second;
  mny1[i] = a[i].second;
  mxm1[i] = abs(a[i].second);
  for (i = 1; i < n; ++i) {
    mxy1[i] = max(mxy1[i - 1], a[i].second);
    mny1[i] = min(mny1[i - 1], a[i].second);
    mxm1[i] = max(mxm1[i - 1], abs(a[i].second));
  }
  i = n - 1;
  mxy2[i] = a[i].second;
  mny2[i] = a[i].second;
  mxm2[i] = abs(a[i].second);
  for (i = n - 2; i >= 0; --i) {
    mxy2[i] = max(mxy2[i + 1], a[i].second);
    mny2[i] = min(mny2[i + 1], a[i].second);
    mxm2[i] = max(mxm2[i + 1], abs(a[i].second));
  }
  long long dist = power(mxy1[n - 1] - mny1[n - 1], 2);
  printf("%lld\n", bins(0, dist));
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
