#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
pair<int, int> p[N];
int maxPre[N], minPre[N], maxSuf[N], minSuf[N], n;
bool check(long long len) {
  if ((1ll * (maxPre[n] - minPre[n]) * (maxPre[n] - minPre[n])) <= len ||
      (1ll * (p[1].first - p[n].first) * (p[1].first - p[n].first)) <= len)
    return true;
  int l, r;
  for (l = r = 1; l <= n && p[l].first <= 0; l++) {
    while (r < n &&
           (1ll * (p[l].first - p[r + 1].first) *
            (p[l].first - p[r + 1].first)) <= len &&
           (p[l].first > 0 ? p[l].first : -p[l].first) >=
               (p[r + 1].first > 0 ? p[r + 1].first : -p[r + 1].first))
      r++;
    while ((p[l].first > 0 ? p[l].first : -p[l].first) <
           (p[r].first > 0 ? p[r].first : -p[r].first))
      r--;
    int maxy = max(maxPre[l - 1], maxSuf[r + 1]),
        miny = min(minPre[l - 1], minSuf[r + 1]);
    if ((1ll * (maxy - miny) * (maxy - miny)) <= len &&
        max((1ll * (maxy) * (maxy)), (1ll * (miny) * (miny))) +
                (1ll * (p[l].first) * (p[l].first)) <=
            len)
      return true;
  }
  for (l = r = n; r && p[r].first >= 0; r--) {
    while (l > 1 &&
           (1ll * (p[l - 1].first - p[r].first) *
            (p[l - 1].first - p[r].first)) <= len &&
           (p[l - 1].first > 0 ? p[l - 1].first : -p[l - 1].first) <=
               (p[r].first > 0 ? p[r].first : -p[r].first))
      l--;
    while ((p[l].first > 0 ? p[l].first : -p[l].first) >
           (p[r].first > 0 ? p[r].first : -p[r].first))
      l++;
    int maxy = max(maxPre[l - 1], maxSuf[r + 1]),
        miny = min(minPre[l - 1], minSuf[r + 1]);
    if ((1ll * (maxy - miny) * (maxy - miny)) <= len &&
        max((1ll * (maxy) * (maxy)), (1ll * (miny) * (miny))) +
                (1ll * (p[r].first) * (p[r].first)) <=
            len)
      return true;
  }
  return false;
}
int main() {
  int i;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d%d", &p[i].first, &p[i].second);
  sort(p + 1, p + n + 1);
  maxPre[0] = maxSuf[n + 1] = -1e9;
  minPre[0] = minSuf[n + 1] = 1e9;
  for (i = 1; i <= n; i++) {
    maxPre[i] = max(p[i].second, maxPre[i - 1]);
    minPre[i] = min(p[i].second, minPre[i - 1]);
  }
  for (i = n; i; i--) {
    maxSuf[i] = max(p[i].second, maxSuf[i + 1]);
    minSuf[i] = min(p[i].second, minSuf[i + 1]);
  }
  long long l = 0, r = 4e16, mid;
  while (l < r) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  printf("%I64d\n", l);
  return 0;
}
