#include <bits/stdc++.h>
using namespace std;
const long long inf = 9e18;
struct Point {
  long long x, y;
};
inline long long sqr(long long q) { return q * q; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<Point> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i].x >> a[i].y;
  sort(a.begin(), a.end(),
       [](Point P, Point Q) { return P.x < Q.x || P.x == Q.x && P.y < Q.y; });
  vector<int> opposite_left(n, -1), opposite_right(n, -1);
  for (int left = 0, right = n - 1; left < n && a[left].x <= 0; ++left) {
    for (; a[right].x > 0 && abs(a[right].x) > abs(a[left].x); --right)
      ;
    opposite_left[left] = right;
  }
  for (int right = n - 1, left = 0; right >= 0 && a[right].x >= 0; --right) {
    for (; a[left].x < 0 && abs(a[left].x) > abs(a[right].x); ++left)
      ;
    opposite_right[right] = left;
  }
  vector<long long> pref_min_y(n + 1), suff_min_y(n + 1), pref_max_y(n + 1),
      suff_max_y(n + 1);
  pref_min_y[0] = suff_min_y[n] = inf;
  pref_max_y[0] = suff_max_y[n] = -inf;
  for (int i = 0; i < n; ++i) {
    pref_min_y[i + 1] = min(pref_min_y[i], a[i].y);
    pref_max_y[i + 1] = max(pref_max_y[i], a[i].y);
  }
  for (int i = n - 1; i >= 0; --i) {
    suff_min_y[i] = min(suff_min_y[i + 1], a[i].y);
    suff_max_y[i] = max(suff_max_y[i + 1], a[i].y);
  }
  long long R = min(sqr(a[n - 1].x - a[0].x),
                    sqr(suff_max_y[0] - suff_min_y[0])),
            L = -1;
  while (R - L > 1) {
    long long M = (L + R) / 2;
    bool success = false;
    for (int left = 0, right1 = 0; left < n && a[left].x <= 0; ++left) {
      if (left > right1) right1 = left;
      for (; right1 < n && sqr(a[right1].x - a[left].x) <= M; ++right1)
        ;
      --right1;
      int right = min(right1, opposite_left[left]);
      long long y_min = min(pref_min_y[left], suff_min_y[right + 1]),
                y_max = max(pref_max_y[left], suff_max_y[right + 1]);
      if (max(sqr(y_min), sqr(y_max)) + sqr(a[left].x) <= M &&
          sqr(y_max - y_min) <= M) {
        success = true;
        break;
      }
    }
    if (!success) {
      for (int right = n - 1, left1 = n - 1; right >= 0 && a[right].x >= 0;
           --right) {
        if (left1 > right) left1 = right;
        for (; left1 >= 0 && sqr(a[right].x - a[left1].x) <= M; --left1)
          ;
        ++left1;
        int left = max(left1, opposite_right[right]);
        long long y_min = min(pref_min_y[left], suff_min_y[right + 1]),
                  y_max = max(pref_max_y[left], suff_max_y[right + 1]);
        if (max(sqr(y_min), sqr(y_max)) + sqr(a[right].x) <= M &&
            sqr(y_max - y_min) <= M) {
          success = true;
          break;
        }
      }
    }
    if (success)
      R = M;
    else
      L = M;
  }
  cout << R << "\n";
  return 0;
}
