#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T read(register T& t) {
  register T f = 1;
  register char ch = getchar();
  t = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') t = t * 10 + ch - '0', ch = getchar();
  t *= f;
  return t;
}
template <typename T, typename... Args>
inline void read(T& t, Args&... args) {
  read(t);
  read(args...);
}
const long long p = 998244353;
inline long long power(register long long x, register long long k = p - 2) {
  register long long re = 1;
  for (; k; k >>= 1, x = x * x % p)
    if (k & 1) re = re * x % p;
  return re;
}
struct node {
  long long x, y;
} v[100005];
int n;
long long l_min[100005], l_max[100005];
long long r_min[100005], r_max[100005];
bool check(long long mid) {
  int r = 1;
  for (int l = 1; l <= n; l++) {
    if (v[l].x > 0) break;
    while (abs(v[r + 1].x) <= abs(v[l].x) &&
           ((v[r + 1].x - v[l].x) * (v[r + 1].x - v[l].x)) <= mid && r + 1 <= n)
      r++;
    while (abs(v[r].x) > abs(v[l].x)) r--;
    long long X = max(((v[l].x) * (v[l].x)), ((v[r].x) * (v[r].x)));
    if (((v[l].x - v[r].x) * (v[l].x - v[r].x)) > mid || X > mid) continue;
    if (l == 1 && r == n) return 1;
    if (l == 1 && r != n)
      if (X + max(((r_max[r + 1]) * (r_max[r + 1])),
                  ((r_min[r + 1]) * (r_min[r + 1]))) <=
              mid &&
          ((r_max[r + 1] - r_min[r + 1]) * (r_max[r + 1] - r_min[r + 1])) <=
              mid)
        return 1;
    if (l != 1 && r == n)
      if (X + max(((l_max[l - 1]) * (l_max[l - 1])),
                  ((l_min[l - 1]) * (l_min[l - 1]))) <=
              mid &&
          ((l_max[l - 1] - l_min[l - 1]) * (l_max[l - 1] - l_min[l - 1])) <=
              mid)
        return 1;
    if (l != 1 && r != n) {
      long long low = min(l_min[l - 1], r_min[r + 1]);
      long long high = max(l_max[l - 1], r_max[r + 1]);
      if (X + max(((low) * (low)), ((high) * (high))) <= mid &&
          ((low - high) * (low - high)) <= mid)
        return 1;
    }
  }
  int l = n;
  for (int r = n; r >= 1; r--) {
    if (v[r].x < 0) break;
    while (abs(v[l - 1].x) <= abs(v[r].x) &&
           ((v[r].x - v[l - 1].x) * (v[r].x - v[l - 1].x)) <= mid && l - 1 >= 1)
      l--;
    while (abs(v[l].x) > abs(v[r].x)) l++;
    long long X = max(((v[l].x) * (v[l].x)), ((v[r].x) * (v[r].x)));
    if (((v[l].x - v[r].x) * (v[l].x - v[r].x)) > mid || X > mid) continue;
    if (l == 1 && r == n) return 1;
    if (l == 1 && r != n)
      if (X + max(((r_max[r + 1]) * (r_max[r + 1])),
                  ((r_min[r + 1]) * (r_min[r + 1]))) <=
              mid &&
          ((r_max[r + 1] - r_min[r + 1]) * (r_max[r + 1] - r_min[r + 1])) <=
              mid)
        return 1;
    if (l != 1 && r == n)
      if (X + max(((l_max[l - 1]) * (l_max[l - 1])),
                  ((l_min[l - 1]) * (l_min[l - 1]))) <=
              mid &&
          ((l_max[l - 1] - l_min[l - 1]) * (l_max[l - 1] - l_min[l - 1])) <=
              mid)
        return 1;
    if (l != 1 && r != n) {
      long long low = min(l_min[l - 1], r_min[r + 1]);
      long long high = max(l_max[l - 1], r_max[r + 1]);
      if (X + max(((low) * (low)), ((high) * (high))) <= mid &&
          ((low - high) * (low - high)) <= mid)
        return 1;
    }
  }
  return 0;
}
int main() {
  read(n);
  if (n == 1) return printf("0"), 0;
  for (int i = 1; i <= n; i++) read(v[i].x, v[i].y);
  sort(v + 1, v + n + 1, [](node a, node b) { return a.x < b.x; });
  long long ans = ((v[1].x - v[n].x) * (v[1].x - v[n].x));
  l_min[1] = l_max[1] = v[1].y;
  for (int i = 2; i <= n; i++)
    l_min[i] = min(l_min[i - 1], v[i].y), l_max[i] = max(l_max[i - 1], v[i].y);
  r_min[n] = r_max[n] = v[n].y;
  for (int i = n - 1; i >= 1; i--)
    r_min[i] = min(r_min[i + 1], v[i].y), r_max[i] = max(r_max[i + 1], v[i].y);
  ans = min(ans, ((r_max[1] - r_min[1]) * (r_max[1] - r_min[1])));
  long long l = 0, r = 4e16;
  while (l < r) {
    long long mid = ((l + r) >> 1);
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  printf("%lld\n", min(l, ans));
}
