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<iostream>
using namespace std;
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cassert>
#include<iomanip>

struct Point{ double x, y; };

Point set_p(double a, double b)
{
    Point p;
    p.x = a; p.y = b;
    return p;
}

struct Vector{ double vx, vy; };

Vector set_v(const Point &p1, const Point &p2)
{
    Vector v;
    v.vx = p2.x - p1.x;
    v.vy = p2.y - p1.y;
    return v;
}

double cross(const Vector &v1, const Vector &v2)
{
    return (v1.vx * v2.vy) - (v1.vy * v2.vx);
}

double dist(const Point &p1, const Point &p2)
{
    return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}

int main()
{
    int i, n;
    double *X, *Y;
    scanf("%d", &n);
    assert(n >= 3);

    X = new double [n + 1];
    Y = new double [n + 1];
    for(i = 0; i < n; i++){
        scanf("%lf %lf", &X[i], &Y[i]);
    }
    X[n] = X[0], Y[n] = Y[0];
    Point *Plg;
    Plg = new Point [n + 1];
    for(i = 0; i < n; i++){
        Plg[i] = set_p(X[i], Y[i]);
    }
    Plg[n] = Plg[0];

    int top = 0;
    double diam = 0;

    for(i = 0; i < n; i++){
        while(cross(set_v(Plg[i], Plg[i + 1]), set_v(Plg[top], Plg[top + 1])) >= 0){
            top++; if(top > n - 1) top -= n;
        };
		// printf("%d\n", top);
        diam = max(diam, max(dist(Plg[i], Plg[top]), dist(Plg[i + 1], Plg[top])));
    }
    // cout << fixed << setprecision(14) << diam << endl;
    printf("%.12f\n", diam);
	// cin >> n;

    return 0;
}