#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e9;
const int maxn = 200000 + 10;
int n;
pair<int, int> p[maxn];
int miny1[maxn], miny2[maxn], maxy1[maxn], maxy2[maxn];
long long sqr(long long first) { return first * first; }
bool check(long long ans) {
  for (int i = 1; i <= n; i++) {
    if (p[i].first > 0) break;
    if (i != 1 && sqr(maxy1[i - 1] - miny1[i - 1]) > ans) continue;
    if (i != 1 && sqr(miny1[i - 1]) + sqr(p[i].first) > ans) continue;
    if (i != 1 && sqr(maxy1[i - 1]) + sqr(p[i].first) > ans) continue;
    int l = i, r = n - 1;
    while (l <= r) {
      long long y1 = min(miny1[i - 1], miny2[((l + r) >> 1) + 1]);
      long long y2 = max(maxy1[i - 1], maxy2[((l + r) >> 1) + 1]);
      if (sqr(y2 - y1) <= ans &&
          max(sqr(y1), sqr(y2)) + sqr(p[i].first) <= ans) {
        r = ((l + r) >> 1) - 1;
      } else
        l = ((l + r) >> 1) + 1;
    }
    r++;
    if (p[r].first <= -1ll * p[i].first &&
        sqr(p[r].first - p[i].first) <= ans) {
      return true;
    }
  }
  return false;
}
long long solve() {
  sort(p + 1, p + 1 + n);
  miny1[0] = inf;
  maxy1[0] = -inf;
  for (int i = 1; i <= n; i++) {
    miny1[i] = min(miny1[i - 1], p[i].second);
    maxy1[i] = max(maxy1[i - 1], p[i].second);
  }
  miny2[n + 1] = inf;
  maxy2[n + 1] = -inf;
  for (int i = n; i > 0; i--) {
    miny2[i] = min(miny2[i + 1], p[i].second);
    maxy2[i] = max(maxy2[i + 1], p[i].second);
  }
  long long l = 0, r = sqr(p[n].first - p[1].first);
  while (l <= r) {
    if (check(((l + r) >> 1)))
      r = ((l + r) >> 1) - 1;
    else
      l = ((l + r) >> 1) + 1;
  }
  return r + 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &p[i].first, &p[i].second);
  long long ans = solve();
  for (int i = 1; i <= n; i++) p[i].first *= -1;
  ans = min(ans, solve());
  for (int i = 1; i <= n; i++) swap(p[i].first, p[i].second);
  sort(p + 1, p + 1 + n);
  ans = min(ans, sqr(p[n].first - p[1].first));
  cout << ans << endl;
  return 0;
}
