#include <bits/stdc++.h>
using namespace std;
const int N = 112345;
const int INF = 1 << 29;
int n, u, v;
int x[N], y[N];
pair<int, int> a[N];
int fl[N], fr[N], gl[N], gr[N];
long long sqr(long long x) { return x * x; }
bool check(long long R) {
  int j = 0;
  for (int i = 0; i < n; ++i)
    if (x[i] <= 0) {
      while (j < n && sqr(x[j] - x[i]) <= R && x[j] <= -x[i]) ++j;
      int yl = min(fl[i], gl[j]), yr = max(fr[i], gr[j]);
      if (yl > yr) return true;
      long long xmax = max(sqr(x[i]), sqr(x[j - 1])),
                ymax = max(sqr(yl), sqr(yr));
      if (sqr(yr - yl) <= R && xmax + ymax <= R) return true;
    }
  return false;
}
long long work() {
  fl[0] = gl[n] = INF;
  fr[0] = gr[n] = -INF;
  for (int i = 0; i < n; ++i)
    fl[i + 1] = min(fl[i], y[i]), fr[i + 1] = max(fr[i], y[i]);
  for (int i = n; i > 0; --i)
    gl[i - 1] = min(gl[i], y[i - 1]), gr[i - 1] = max(gr[i], y[i - 1]);
  long long l = 0, r = (long long)INF * INF;
  while (l < r) {
    long long m = l + r >> 1;
    if (check(m))
      r = m;
    else
      l = m + 1;
  }
  return l;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d%d", &u, &v), a[i] = make_pair(u, v);
  sort(a, a + n);
  for (int i = 0; i < n; ++i) x[i] = a[i].first, y[i] = a[i].second;
  long long ans = work();
  for (int i = 0; i < n; ++i) a[i] = make_pair(-x[i], y[i]);
  sort(a, a + n);
  for (int i = 0; i < n; ++i) x[i] = a[i].first, y[i] = a[i].second;
  ans = min(ans, work());
  for (int i = 0; i < n; ++i) a[i] = make_pair(y[i], x[i]);
  sort(a, a + n);
  for (int i = 0; i < n; ++i) x[i] = a[i].first, y[i] = a[i].second;
  ans = min(ans, work());
  for (int i = 0; i < n; ++i) a[i] = make_pair(-x[i], y[i]);
  sort(a, a + n);
  for (int i = 0; i < n; ++i) x[i] = a[i].first, y[i] = a[i].second;
  ans = min(ans, work());
  cout << ans << endl;
  return 0;
}
