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;
pair<long long, long long> a[100010], b[100010];
long long mxp[100010], mnp[100010], mxs[100010], mns[100010];
int n;
inline long long sqr(long long x) { return x * x; }
long long calc(pair<long long, long long> p[]) {
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    mxp[i] = max(mxp[i - 1], p[i].second);
    mnp[i] = min(mnp[i - 1], p[i].second);
  }
  for (int i = n; i; i--) {
    mxs[i] = max(mxs[i + 1], p[i].second);
    mns[i] = min(mns[i + 1], p[i].second);
  }
  long long l = 0, r = 1e18;
  while (l < r) {
    long long mid = (l + r) >> 1;
    int flag = sqr(p[n].first - p[1].first) <= mid;
    int last = 1;
    if (!flag)
      for (int i = 1; i <= n; i++) {
        while (sqr(p[i].first - p[last].first) > mid) last++;
        long long minn = min(mnp[last - 1], mns[i + 1]),
                  maxx = max(mxp[last - 1], mxs[i + 1]);
        if (sqr(maxx - minn) <= mid &&
            max(sqr(maxx), sqr(minn)) +
                    max(sqr(p[i].first), sqr(p[last].first)) <=
                mid) {
          flag = 1;
          break;
        }
      }
    if (flag)
      r = mid;
    else
      l = mid + 1;
  }
  return r;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    a[i] = make_pair(x, y);
    b[i] = make_pair(y, x);
  }
  long long ans = min(calc(a), calc(b));
  printf("%lld\n", ans);
}
