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>
#define ll long long
#define inf 0x3f3f3f3f
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
#define pa pair<int,int>
const int N=1e6+10;
const int mod=998244353;
using namespace std;

struct point{double x,y;}p[N],s[N];
inline bool cmp2(point a,point b)
{
    double aa=atan2(a.y-p[1].y,a.x-p[1].x);
    double bb=atan2(b.y-p[1].y,b.x-p[1].x);
    if(fabs(aa-bb)<=1e-10||aa==bb) return a.x<b.x;
    return aa<bb;
}
inline double cross(point a,point b,point c){return (b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x); }
inline int get(int n)
{
    p[0].x=p[0].y=2e9; int k;  
    for(int i=1;i<=n;i++) if(p[0].y>p[i].y||(p[0].y==p[i].y&&p[0].x>p[i].x)){p[0]=p[i]; k=i;}
    swap(p[k],p[1]);
    sort(p+2,p+1+n,cmp2);
    s[1]=p[1],s[2]=p[2]; int top=2;
    for(int i=3;i<=n;i++)
    {
        while(top>1&&cross(s[top-1],p[i],s[top])>=0) top--;
        s[++top]=p[i];
    }
    return top;
}
inline double dis(point a,point b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)); }
double get_d(int top)
{
    if(top==2) return dis(s[1],s[2]);
    s[++top]=s[1];
    double d=0; int j=3;
    for(int i=1;i<top;i++)
    {
        while(cross(s[j],s[i],s[i+1])<cross(s[j+1],s[i],s[i+1])) j=j%(top-1)+1;
        d=max(d,max(dis(s[i],s[j]),dis(s[i+1],s[j])));
    }
    return d;
}
int main()
{     
     int n; scanf("%d",&n);
     for(int i=1;i<=n;i++)  scanf("%lf%lf",&p[i].x,&p[i].y);
     int top=get(n);   
     double d=get_d(top);
     printf("%.10f\n",d);
return 0;   
}
/*
*/