#include <bits/stdc++.h>
using namespace std;
int N;
signed long long X[101010], Y[101010];
pair<signed long long, signed long long> P[101010];
signed long long Lmiy[101010], Lmay[101010];
signed long long Rmiy[101010], Rmay[101010];
int ok(signed long long v) {
  int L, R;
  R = 0;
  for (L = 0; L < (N); L++) {
    if (X[L] > 0) break;
    signed long long ri = min(-X[L], X[L] + (signed long long)sqrt(v + 1e-8));
    while (R + 1 < N && X[R + 1] <= ri) R++;
    while (X[R] > ri) R--;
    signed long long miy = min(Rmiy[R + 1], Lmiy[L]);
    signed long long may = max(Rmay[R + 1], Lmay[L]);
    signed long long ma = max(may, -miy);
    if (max((may - miy) * (may - miy), X[L] * X[L] + ma * ma) <= v) return 1;
  }
  L = N - 1;
  for (R = N - 1; R >= 0; R--) {
    if (X[R] < 0) break;
    signed long long le = max(-X[R], X[R] - (signed long long)sqrt(v + 1e-8));
    while (L > 0 && X[L - 1] >= le) L--;
    while (X[L] < le) L++;
    signed long long miy = min(Rmiy[R + 1], Lmiy[L]);
    signed long long may = max(Rmay[R + 1], Lmay[L]);
    signed long long ma = max(may, -miy);
    if (max((may - miy) * (may - miy), X[R] * X[R] + ma * ma) <= v) return 1;
  }
  return 0;
}
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> N;
  for (i = 0; i < (N); i++) cin >> P[i].first >> P[i].second;
  sort(P, P + N);
  for (i = 0; i < (N); i++) X[i] = P[i].first, Y[i] = P[i].second;
  for (i = 0; i < (N); i++) {
    Lmay[i + 1] = max(Lmay[i], Y[i]);
    Lmiy[i + 1] = min(Lmiy[i], Y[i]);
  }
  for (i = N - 1; i >= 0; i--) {
    Rmay[i] = max(Rmay[i + 1], Y[i]);
    Rmiy[i] = min(Rmiy[i + 1], Y[i]);
  }
  signed long long ret = (1LL << 60) - 1;
  for (i = 59; i >= 0; i--)
    if (ok(ret - (1LL << i))) ret -= 1LL << i;
  signed long long mixx = *min_element(X, X + N);
  signed long long maxx = *max_element(X, X + N);
  signed long long miyy = *min_element(Y, Y + N);
  signed long long mayy = *max_element(Y, Y + N);
  ret = min(ret, (maxx - mixx) * (maxx - mixx));
  ret = min(ret, (mayy - miyy) * (mayy - miyy));
  cout << ret << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
