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 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<n;++i)

using namespace std;

const int MAX_N = 100005;

double add(double a,double b)
{
    if(abs(a+b) < EPS * (abs(a) + abs(b))){
        return 0;
    }
    return a + b;
}

struct P
{
    double x,y;
    P() {}
    P(double x,double y) : x(x),y(y) {}
    P operator + (P p){
        return P(add(x,p.x),add(y,p.y));
    }
    P operator - (P p){
        return P(add(x,-p.x),add(y,-p.y));
    }
    P operator * (double d){
        return P(x*d,y*d);
    }
    double dot(P p){
        return add(x*p.x,y*p.y);
    }
    double det(P p){
        return add(x*p.y,-y*p.x);
    }
};

int n;
P ps[MAX_N];

bool cmp_x(const P& p,const P& q)
{
    if(p.x != q.x){
        return p.x < q.x;
    }
    return p.y < q.y;
}

vector<P> convex_hull(P* ps,int n)
{
    sort(ps,ps+n,cmp_x);
    int k = 0;
    vector<P> qs(n*2);
    rep(i,n){
        while(k > 1 && (qs[k-1] - qs[k-2]).det(ps[i] - qs[k-1]) <= 0){
            k--;
        }
        qs[k++] = ps[i];
    }
    for(int i = n-2,t=k;i >= 0;i--){
        while(k > t && (qs[k-1] - qs[k-2]).det(ps[i] - qs[k-1]) <= 0){
            k--;
        }
        qs[k++] = ps[i];
    }
    qs.resize(k-1);
    return qs;
}

double dist(P p,P q)
{
    return (p-q).dot(p-q);
}

int main()
{
	scanf("%d",&n);
	rep(i,n){
        double a,b;
		scanf("%lf%lf",&a,&b);
        ps[i] = P(a,b);
	}
    vector<P> qs = convex_hull(ps,n);
    if(qs.size() == 2){ //???????????°??????????????´???
        printf("%.0f\n",dist(qs[0],qs[1]));
        return 0;
    }
    int i = 0,j = 0;
    rep(k,qs.size()){
        if(!cmp_x(qs[i],qs[k])){
            i = k;
        }
        if(cmp_x(qs[j],qs[k])){
            j = k;
        }
    }
    double res = 0;
    int si = i,sj = j;
    while(i != sj || j != si){
        res = max(res,dist(qs[i],qs[j]));
        if((qs[(i+1) % qs.size()] - qs[i]).det(qs[(j+1) % qs.size()] - qs[j]) < 0){
            i = (i+1) % qs.size();
        }else{
            j = (j+1) % qs.size();
        }
    }
    printf("%.10lf\n",sqrt(res));
	return 0;
}