#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
pair<int, int> m[100100];
int m1[100100], m2[100100], m3[100100], m4[100100];
int main() {
  int n, i, j;
  scanf("%d", &n);
  for (i = 0; i < n; scanf("%d%d", &m[i].first, &m[i].second), i++)
    ;
  long long z = 1000000000000000000ll;
  for (int k = 0; k < 2; k++) {
    sort(m, m + n);
    z = min(z, (long long)(m[n - 1].first - m[0].first) *
                   (m[n - 1].first - m[0].first));
    for (i = 0; i < n; m1[i + 1] = min(m1[i], m[i].second),
        m2[i + 1] = max(m2[i], m[i].second), i++)
      ;
    for (i = n - 1; i >= 0; m3[i] = min(m3[i + 1], m[i].second),
        m4[i] = max(m4[i + 1], m[i].second), i--)
      ;
    long long l, c, r;
    for (l = 0, r = 100000000000000000ll; l < r;) {
      c = (l + r) / 2;
      int f = 0;
      for (i = 0, j = n - 1; i < n && m[i].first <= 0; i++) {
        if (j < 0 || m[j].first <= 0) j++;
        for (; j > i && m[j].first > 0;) {
          if (m[j].first > -m[i].first ||
              (long long)(m[j].first - m[i].first) * (m[j].first - m[i].first) >
                  c)
            j--;
          else {
            j++;
            if (j == n || m[j].first > -m[i].first ||
                (long long)(m[j].first - m[i].first) *
                        (m[j].first - m[i].first) >
                    c) {
              j--;
              break;
            }
          }
        }
        int x1 = min(m1[i], m3[j + 1]);
        int x2 = max(m2[i], m4[j + 1]);
        if ((long long)(x2 - x1) * (x2 - x1) <= c &&
            (long long)x1 * x1 + (long long)m[i].first * m[i].first <= c &&
            (long long)x2 * x2 + (long long)m[i].first * m[i].first <= c)
          f = 1;
      }
      for (i = n - 1, j = 0; i >= 0 && m[i].first >= 0; i--) {
        if (j >= n || m[j].first >= 0) j--;
        for (; j < i && m[j].first < 0;) {
          if (-m[j].first > m[i].first ||
              (long long)(m[j].first - m[i].first) * (m[j].first - m[i].first) >
                  c)
            j++;
          else {
            j--;
            if (j < 0 || -m[j].first > m[i].first ||
                (long long)(m[j].first - m[i].first) *
                        (m[j].first - m[i].first) >
                    c) {
              j++;
              break;
            }
          }
        }
        int x1 = min(m1[j], m3[i + 1]);
        int x2 = max(m2[j], m4[i + 1]);
        if ((long long)(x2 - x1) * (x2 - x1) <= c &&
            (long long)x1 * x1 + (long long)m[i].first * m[i].first <= c &&
            (long long)x2 * x2 + (long long)m[i].first * m[i].first <= c)
          f = 1;
      }
      if (f)
        r = c;
      else
        l = c + 1;
    }
    z = min(z, r);
    for (i = 0; i < n; swap(m[i].first, m[i].second), i++)
      ;
  }
  printf("%lld\n", z);
  return 0;
}
