Programmer Sasha is a student at MIPT (Moscow Institute of Physics and Technology) and he needs to make a laboratory work to pass his finals.

A laboratory unit is a plane with standard coordinate axes marked on it. Physicists from Moscow Institute of Physics and Technology charged the axes by large electric charges: axis X is positive and axis Y is negative.

Experienced laboratory worker marked n points with integer coordinates (xi, yi) on the plane and stopped the time. Sasha should use "atomic tweezers" to place elementary particles in these points. He has an unlimited number of electrons (negatively charged elementary particles) and protons (positively charged elementary particles). He can put either an electron or a proton at each marked point. As soon as all marked points are filled with particles, laboratory worker will turn on the time again and the particles will come in motion and after some time they will stabilize in equilibrium. The objective of the laboratory work is to arrange the particles in such a way, that the diameter of the resulting state (the maximum distance between the pairs of points of the set) is as small as possible.

Since Sasha is a programmer, he naively thinks that all the particles will simply "fall" into their projections on the corresponding axes: electrons will fall on axis X, while protons will fall on axis Y. As we are programmers too, we will consider the same model as Sasha. That is, a particle gets from point (x, y) to point (x, 0) if it is an electron and to point (0, y) if it is a proton.

As the laboratory has high background radiation and Sasha takes care of his laptop, he did not take it with him, and now he can't write a program that computes the minimum possible diameter of the resulting set. Therefore, you will have to do it for him.

Print a square of the minimum possible diameter of the set.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of points marked on the plane.

Each of the next n lines contains two integers xi and yi ( - 108 ≤ xi, yi ≤ 108) — the coordinates of the i-th point. It is guaranteed that no two points coincide.

Output

Print a single integer — the square of the minimum possible diameter of the set.

Examples

Input

3
1 10
1 20
1 30


Output

0


Input

2
1 10
10 1


Output

2

Note

In the first sample Sasha puts electrons at all points, all particles eventually fall at a single point (1, 0).

In the second sample Sasha puts an electron at point (1, 10), and a proton at point (10, 1). The result is a set of two points (1, 0) and (0, 1), which has a diameter of <image>.
#include <bits/stdc++.h>
using namespace std;
const long long INF = 9223372036854775807LL, SQ_MAX = 40000000000000000LL;
void getmin(long long &a, const long long b) {
  if (b < a) a = b;
}
void getmax(long long &a, const long long b) {
  if (b > a) a = b;
}
long long Sq(const long long a) { return a * a; }
struct Point {
  long long x, y;
  Point() {}
  Point(const long long _x, const long long _y) : x(_x), y(_y) {}
};
int N;
Point P[100000];
bool SolveTilt(const long long tsq) {
  long long ymn = 0, ymx = 0;
  int l, r = 0;
  for (l = 0; l < N && P[l].x < 0 && Sq(P[l].x) < tsq; l++)
    getmax(ymx, P[l].y), getmin(ymn, P[l].y);
  for (;;) {
    if (l == N || P[l].x >= 0) return false;
    for (; r < N && Sq(P[r].x - P[l].x) <= tsq; r++)
      ;
    const long long y2 = sqrt(tsq - Sq(P[l].x));
    if (y2 > -P[l].x) return false;
    const long long y1 = max(-y2, (long long)(y2 - sqrt(tsq)));
    if (r == N && ymn <= y1 && y2 <= ymx) return true;
    getmax(ymx, P[l].y), getmin(ymn, P[l].y);
    l++;
  }
}
bool SolveLine(const long long lsq) {
  static long long lymx[100000], lymn[100000], rymx[100000], rymn[100000];
  lymx[0] = lymn[0] = P[0].y;
  for (int i = 1; i < N; i++)
    lymx[i] = max(lymx[i - 1], P[i].y), lymn[i] = min(lymn[i - 1], P[i].y);
  rymx[N - 1] = rymn[N - 1] = P[N - 1].y;
  for (int i = N - 1; i >= 0; i--)
    rymx[i] = max(rymx[i + 1], P[i].y), rymn[i] = min(rymn[i + 1], P[i].y);
  for (int r = 0, l = 0; r < N; r++) {
    for (; Sq(P[r].x - P[l].x) > lsq; l++)
      ;
    if (l == 0 && r == N - 1) return true;
    const long long x1 = P[l].x, x2 = P[r].x,
                    y1 = min(l > 0 ? lymn[l - 1] : INF,
                             r + 1 < N ? rymn[r + 1] : INF),
                    y2 = max(l > 0 ? lymx[l - 1] : -INF,
                             r + 1 < N ? rymx[r + 1] : -INF);
    if (Sq(y2 - y1) <= lsq && max(Sq(y1), Sq(y2)) + max(Sq(x1), Sq(x2)) <= lsq)
      return true;
  }
  return false;
}
bool CmpX(const Point &a, const Point &b) { return a.x < b.x; }
long long TiltMin() {
  sort(P, P + N, CmpX);
  long long l = 0, r = SQ_MAX;
  while (l < r) {
    const long long mid = (l + r) / 2;
    if (SolveTilt(mid))
      r = mid;
    else
      l = mid + 1LL;
  }
  return r;
}
long long LineMin() {
  sort(P, P + N, CmpX);
  long long l = 0, r = SQ_MAX;
  while (l < r) {
    const long long mid = (l + r) / 2;
    if (SolveLine(mid))
      r = mid;
    else
      l = mid + 1LL;
  }
  return r;
}
void Flip1(bool ish) {
  for (int i = 0; i < N; i++) (ish ? P[i].x : P[i].y) *= -1;
}
void Flip2() {
  for (int i = 0; i < N; i++) swap(P[i].x, P[i].y);
}
void Flip3() {
  Flip2();
  Flip1(true), Flip1(false);
}
int main() {
  while (scanf("%d", &N) == 1) {
    for (int i = 0; i < N; i++) scanf("%lld%lld", &P[i].x, &P[i].y);
    long long ans = INF;
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 2; j++) getmin(ans, TiltMin()), Flip3();
      Flip1(i & 1);
    }
    for (int i = 0; i < 2; i++) getmin(ans, LineMin()), Flip2();
    printf("%lld\n", ans);
  }
  return 0;
}
