#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> a[100010], b[100010];
long long mxp[100010], mnp[100010], mxs[100010], mns[100010];
int n;
inline long long sqr(long long x) { return x * x; }
long long calc(pair<long long, long long> p[]) {
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    mxp[i] = max(mxp[i - 1], p[i].second);
    mnp[i] = min(mnp[i - 1], p[i].second);
  }
  for (int i = n; i; i--) {
    mxs[i] = max(mxs[i + 1], p[i].second);
    mns[i] = min(mns[i + 1], p[i].second);
  }
  long long l = 0, r = 1e18;
  while (l < r) {
    long long mid = (l + r) >> 1;
    int flag = sqr(p[n].first - p[1].first) <= mid;
    int last = 1;
    if (!flag)
      for (int i = 1; i <= n; i++) {
        while (sqr(p[i].first - p[last].first) > mid) last++;
        long long minn = min(mnp[last - 1], mns[i + 1]),
                  maxx = max(mxp[last - 1], mxs[i + 1]);
        if (sqr(maxx - minn) <= mid &&
            max(sqr(maxx), sqr(minn)) +
                    max(sqr(p[i].first), sqr(p[last].first)) <=
                mid) {
          flag = 1;
          break;
        }
      }
    if (flag)
      r = mid;
    else
      l = mid + 1;
  }
  return r;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    a[i] = make_pair(x, y);
    b[i] = make_pair(y, x);
  }
  long long ans = min(calc(a), calc(b));
  printf("%lld\n", ans);
}
