Problem: Find the diameter of a convex polygon g. In other words, find a pair of points that have maximum distance between them.

Constraints

* 3 ≤ n ≤ 80000
* -100 ≤ xi, yi ≤ 100
* No point in the g will occur more than once.

Input


n
x1 y1
x2 y2
:
xn yn


The first integer n is the number of points in g.

In the following lines, the coordinate of the i-th point pi is given by two real numbers xi and yi. The coordinates of points are given in the order of counter-clockwise visit of them. Each value is a real number with at most 6 digits after the decimal point.

Output

Print the diameter of g in a line. The output values should be in a decimal fraction with an error less than 0.000001.

Examples

Input

3
0.0 0.0
4.0 0.0
2.0 2.0


Output

4.00


Input

4
0.0 0.0
1.0 0.0
1.0 1.0
0.0 1.0


Output

1.414213562373

Solution (in CPP):

Solution:
#include <cstdio>
#include <utility>
#include <vector>
#include <complex>
#include <cmath>
#include <algorithm>
#include <functional>

using namespace std;

static const double EPS=1e-12;
static const double INF=1e24;

using Point=complex<double>;
using Plane=vector<Point>;
using Polygon=vector<Point>;

bool operator<(const Point &a, const Point &b) {
    return real(a)!=real(b)? real(a)<real(b) : imag(a)<imag(b);
}

double cross_prod(const Point &a, const Point &b) {
    return imag(conj(a)*b);
}

double dot_prod(const Point &a, const Point &b) {
    return real(conj(a)*b);
}

double convex_diameter(const Polygon &g) {
    size_t V=g.size();
    size_t is=0, js=0;
    for (size_t i=1; i<V; ++i) {
        if (imag(g[i]) > imag(g[is])) is = i;
        if (imag(g[i]) < imag(g[js])) js = i;
    }

    double res=abs(g[is]-g[js]);
    size_t i, j, max_i, max_j;
    i = max_i = is;
    j = max_j = js;
    do {
        (++(cross_prod(g[(i+1)%V]-g[i], g[(j+1)%V]-g[j])>=0? j:i)) %= V;

        if (res < abs(g[i]-g[j])) {
            res = abs(g[i]-g[j]);
            max_i = i;
            max_j = j;
        }
    } while (!((i == is) && (j == js)));

    // <max_i, max_j>
    return res;
}

int main() {
    size_t n;
    scanf("%zu", &n);

    Polygon g(n);
    for (size_t i=0; i<n; ++i) {
        double x, y;
        scanf("%lf %lf", &x, &y);
        g[i] = Point(x, y);
    }

    printf("%.9f\n", convex_diameter(g));
    return 0;
}