#include <bits/stdc++.h>
using namespace std;
const int M = 1024 * 128;
const int inf = 1e9;
int n;
bool B[2][100005];
vector<pair<int, int> > V[2];
pair<int, int> D[2][2 * M];
void add(int q, int v, int val) {
  B[q][v] = 1;
  v += M;
  D[q][v] = make_pair(val, val);
  while (v > 1) {
    v /= 2;
    D[q][v].first = min(D[q][2 * v].first, D[q][2 * v + 1].first);
    D[q][v].second = max(D[q][2 * v].second, D[q][2 * v + 1].second);
  }
}
void remove(int q, int v, int val) {
  B[q][v] = 0;
  v += M;
  D[q][v] = make_pair(inf, -inf);
  while (v > 1) {
    v /= 2;
    D[q][v].first = min(D[q][2 * v].first, D[q][2 * v + 1].first);
    D[q][v].second = max(D[q][2 * v].second, D[q][2 * v + 1].second);
  }
}
int main() {
  scanf("%d", &n);
  for (int q = 0; q < 2; q++) {
    for (int i = 1; i < 2 * M; i++) {
      D[q][i].first = inf;
      D[q][i].second = -inf;
    }
  }
  for (int i = 0; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    V[0].push_back(make_pair(a, b));
    V[1].push_back(make_pair(-a, b));
  }
  sort(V[0].begin(), V[0].end());
  sort(V[1].begin(), V[1].end());
  long long st = 0, en = 4 * 1e16, mid = (st + en) / 2, r = en;
  while (st <= en) {
    bool boo = 0;
    for (int q = 0; q < 2; q++) {
      int ind = n - 1;
      for (int i = 0; i < n; i++)
        if (!B[q][i]) add(q, i, V[q][i].second);
      long long el = D[q][1].second - D[q][1].first;
      if (el * el <= mid) {
        boo = 1;
        break;
      }
      for (int i = n - 1; i >= 0; i--) {
        if (V[q][i].first < 0) break;
        while (ind >= 0 && abs(V[q][ind].first) <= V[q][i].first &&
               (long long)(V[q][i].first - V[q][ind].first) *
                       (long long)(V[q][i].first - V[q][ind].first) <=
                   mid) {
          remove(q, ind, V[q][ind].second);
          ind--;
        }
        while (ind < i && abs(V[q][ind + 1].first) > V[q][i].first) {
          ind++;
          add(q, ind, V[q][ind].second);
        }
        long long h = 0, l = 0;
        if (D[q][1].first != inf) {
          h = max(abs(D[q][1].first), abs(D[q][1].second));
          l = D[q][1].second - D[q][1].first;
        }
        if (D[q][1].first == inf ||
            ((h * h) + ((long long)V[q][i].first * (long long)V[q][i].first) <=
                 mid &&
             l * l <= mid))
          boo = 1;
        add(q, i, V[q][i].second);
        if (boo) break;
      }
      if (boo) break;
    }
    if (boo) {
      r = min(r, mid);
      en = mid - 1;
    } else
      st = mid + 1;
    mid = (st + en) / 2;
  }
  printf("%lld\n", r);
  return 0;
}
