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;
const double eps=1e-10;
int sign(double x)
{
    if(fabs(x)<=eps)return 0;
    if(x>0)return 1;
    return -1;
}
struct Point{
    double x,y;
    Point(double _x=0,double _y=0):x(_x),y(_y){}
    Point operator + (Point p){return Point(x+p.x,y+p.y);}
    Point operator - (Point p){return Point(x-p.x,y-p.y);}
    Point operator * (double k){return Point(x*k,y*k);}
    Point operator / (double k){return Point(x/k,y/k);}
    double norm(){return x*x+y*y;}
    double abs(){return sqrt(norm());}
    bool operator < (const Point &p)const{return x!=p.x?x<p.x:y<p.y;}
};
typedef Point Vector;
typedef vector<Point> Polygon;
double dot(Vector a,Vector b){return a.x*b.x+a.y*b.y;}
double cross(Vector a,Vector b){return a.x*b.y-a.y*b.x;}
int ccw(Point p0,Point p1,Point p2)
{
    Vector a=p1-p0,b=p2-p0;
    if(sign(cross(a,b))==1)return 1;
    return 0;
}
int n;
Point p;
Polygon g,s,ans;
double Area(Point a,Point b,Point c)
{
    Vector x1=b-a,y1=c-a;
    return cross(x1,y1);
}
Polygon andrew()
{
    s=g;
    int n=s.size();
    sort(s.begin(),s.end());
    Polygon u;
    for(int i=0;i<n;i++){
        for(int j=u.size();j>=2&&sign(Area(u[j-2],u[j-1],s[i]))>=0;j--){
            u.pop_back();
        }
        u.push_back(s[i]);
    }
    int tmp=u.size()+1;
    for(int i=n-2;i>=0;i--){
        for(int j=u.size();j>=tmp&&sign(Area(u[j-2],u[j-1],s[i]))>=0;j--){
            u.pop_back();
        }
        u.push_back(s[i]);
    }
    if(n>1)u.pop_back();
    reverse(u.begin(),u.end());
    return u;
}
double rc()
{
    double res=0;
    int n=ans.size();
    int k=1;
    for(int i=0;i<n;i++){
        while(sign(Area(ans[i],ans[(i+1)%n],ans[(k+1)%n])-Area(ans[i],ans[(i+1)%n],ans[k%n]))==1)k=(k+1)%n;
        res=max(res,(ans[i]-ans[k]).abs());
    }
    return res;
}
int main()
{
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%lf%lf",&p.x,&p.y);
        g.push_back(p);
    }
    ans=andrew();
    printf("%.10f\n",rc());
    return 0;
}