#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[200005];
int n;
pair<int, int> pre[200005], suf[200005];
long long sqr(int a) { return (long long)a * a; }
bool check(long long M) {
  int start = 0;
  for (int rborder = 0; rborder < n; rborder++) {
    while (sqr((long long)p[rborder].first - (long long)p[start].first) > M &&
           rborder >= start)
      start++;
    int up = max(pre[start - 1].first, suf[rborder + 1].first);
    int down = min(pre[start - 1].second, suf[rborder + 1].second);
    if (max(sqr(p[start].first), sqr(p[rborder].first)) +
                    max(sqr(up), sqr(down)) <=
                M &&
            sqr(up - down) <= M ||
        rborder - start == n - 1)
      return true;
  }
  return false;
}
long long solve() {
  sort(p, p + n);
  pre[0].first = pre[0].second = p[0].second;
  for (int i = 1; i < n; i++)
    pre[i].first = max(pre[i - 1].first, p[i].second),
    pre[i].second = min(pre[i - 1].second, p[i].second);
  suf[n - 1].first = suf[n - 1].second = p[n - 1].second;
  for (int i = n - 2; i >= 0; i--)
    suf[i].first = max(suf[i + 1].first, p[i].second),
    suf[i].second = min(suf[i + 1].second, p[i].second);
  long long left = -1LL, right = 1e18;
  while (right - left > 1) {
    long long mid = (left + right) >> 1;
    if (!check(mid))
      left = mid;
    else
      right = mid;
  }
  return right;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d%d", &p[i].first, &p[i].second);
  long long res = solve();
  for (int i = 0; i < n; i++) swap(p[i].first, p[i].second);
  cout << min(res, solve()) << endl;
  return 0;
}
