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<bits/stdc++.h>

using namespace std;

typedef complex<double> Point;
const double eps = 1e-10;

double dist(const Point &a,const Point &b)
{
    return abs(a-b);
}

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

double getDiameter(const vector<Point> &points,int sz)
{
    double ans = 0;
    int lm=0,rm=0;
    for(int i=0;i<sz;i++)
    {
        if(points[lm].real()>points[i].real()) lm=i;
        if(points[rm].real()<points[i].real()) rm=i;
    }
    int i=lm,j=rm;
    while(i!=rm || j!=lm)
    {
        ans=max(ans,dist(points[i],points[j]));
        if(cross(points[(i+1)%sz]-points[i],points[(j+1)%sz]-points[j])<-eps)
        {
            i=(i+1)%sz;
        }else
        {
            j=(j+1)%sz;
        }
    }

    return ans;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    cin>>n;
    vector<Point> points;
    for(int i=0;i<n;i++)
    {
        double x,y;
        cin>>x>>y;
        points.emplace_back(x,y);
    }

    cout<<setprecision(10)<<fixed<<getDiameter(points,n)<<endl;

    return 0;
}