#include <bits/stdc++.h>
using namespace std;
int n;
long long lmin[110000], rmin[110000], lmax[110000], rmax[110000];
long long sq(long long x) { return x * x; }
struct node {
  long long x, y;
  node(long long x = 0, long long y = 0) : x(x), y(y) {}
  bool operator<(const node &xx) const {
    if (x != xx.x) return x < xx.x;
    return y < xx.y;
  }
} a[110000];
int check(long long mid) {
  int l, r;
  long long min_y, max_y, tmp = 1000000000LL;
  for (l = 1, r = 1; l <= n && a[l].x <= 0; l++) {
    while (r < n && sq(a[r + 1].x - a[l].x) <= mid &&
           abs(a[r + 1].x) <= abs(a[l].x))
      r++;
    while (abs(a[r].x) > abs(a[l].x)) r--;
    long long min_y = min(lmin[l - 1], rmin[r + 1]);
    long long max_y = max(lmax[l - 1], rmax[r + 1]);
    if (sq(max_y - min_y) <= mid &&
        max(sq(min_y), sq(max_y)) + sq(abs(a[l].x)) <= mid)
      return true;
  }
  for (l = n, r = n; r >= 1 && a[r].x >= 0; r--) {
    while (l > 1 && sq(a[l - 1].x - a[r].x) <= mid &&
           abs(a[l - 1].x) <= abs(a[r].x))
      l--;
    while (abs(a[l].x) > abs(a[r].x)) l++;
    long long min_y = min(lmin[l - 1], rmin[r + 1]);
    long long max_y = max(lmax[l - 1], rmax[r + 1]);
    if (sq(max_y - min_y) <= mid &&
        max(sq(min_y), sq(max_y)) + sq(abs(a[r].x)) <= mid)
      return true;
  }
  return 0;
}
int main() {
  long long max_x = -1000000000LL, max_y = -1000000000LL, min_x = 1000000000LL,
            min_y = 1000000000LL;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &a[i].x, &a[i].y);
    max_x = max(max_x, a[i].x);
    max_y = max(max_y, a[i].y);
    min_y = min(min_y, a[i].y);
    min_x = min(min_x, a[i].x);
  }
  sort(a + 1, a + 1 + n);
  for (int i = n; i >= 1; i--) {
    rmin[i] = min(a[i].y, rmin[i + 1]);
    rmax[i] = max(a[i].y, rmax[i + 1]);
  }
  for (int i = 1; i <= n; i++) {
    lmin[i] = min(a[i].y, lmin[i - 1]);
    lmax[i] = max(a[i].y, lmax[i - 1]);
  }
  long long l, r, ans;
  l = 0;
  ans = r = min(sq(max_x - min_x), sq(max_y - min_y));
  while (l <= r) {
    long long mid = l + r >> 1ll;
    if (check(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%lld\n", ans);
}
