#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &first) {
  first = 0;
  char c;
  int positive = 1;
  while (!isdigit(c = getchar()))
    if (c == '-') positive = 0;
  do first = first * 10 + c - '0';
  while (isdigit(c = getchar()));
  if (!positive) first = -first;
}
template <typename T>
inline void write(T first) {
  if (first > 9) write(first / 10);
  putchar(first % 10 + 48);
}
const int maxn = 100010;
const int oo = 1e9;
int n;
int minp[maxn], mins[maxn], maxp[maxn], maxs[maxn];
pair<int, int> a[maxn];
void input() {
  read(n);
  for (int i = (1), _b = (n); i <= _b; i++) read(a[i].first), read(a[i].second);
}
void init() {
  sort(a + 1, a + 1 + n);
  minp[0] = oo;
  maxp[0] = -oo;
  mins[n + 1] = oo;
  maxs[n + 1] = -oo;
  for (int i = (1), _b = (n); i <= _b; i++)
    minp[i] = min(minp[i - 1], a[i].second),
    maxp[i] = max(maxp[i - 1], a[i].second);
  for (int i = (n), _a = (1); i >= _a; i--)
    mins[i] = min(mins[i + 1], a[i].second),
    maxs[i] = max(maxs[i + 1], a[i].second);
}
long long sqr(int first) { return 1ll * first * first; }
bool check(long long len) {
  int slen = sqrt(len);
  for (int i = 1, j = 1; i <= n; ++i) {
    int r = min(a[i].first + slen, -a[i].first);
    if (r < a[i].first) break;
    while (j < n && a[j + 1].first <= r) ++j;
    while (j > i && a[j].first > r) --j;
    if (i == 1 && j == n) return true;
    int maxy = max(maxp[i - 1], maxs[j + 1]);
    int miny = min(minp[i - 1], mins[j + 1]);
    if (sqr(maxy - miny) <= len &&
        sqr(a[i].first) + sqr(max(abs(miny), abs(maxy))) <= len)
      return true;
  }
  return false;
}
long long cal(long long lb) {
  init();
  long long l = 0, r = lb;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  return l;
}
void solve() {
  long long save = cal(1e17);
  save = min(save, sqr(maxp[n] - minp[n]));
  for (int i = (1), _b = (n); i <= _b; i++) a[i].first *= -1;
  save = cal(save - 1);
  write(save);
}
int main() {
  clock_t timestart, timeend;
  timestart = clock();
  input();
  solve();
  timeend = clock();
  return 0;
}
