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 <stdio.h>
#include <math.h>

using namespace std;
#define dTolerance 1.0e-10

int main(){
    int n;
    scanf("%d", &n);
    double x[n+1],y[n+1];
    for (int i = 0; i < n; i++){
        scanf("%lf %lf", &x[i], &y[i]);
    }
    x[n] = x[0];
    y[n] = y[0];

    int ixMin = 0;
    int ixMax = 0;
    for (int i = 0; i < n; i++){
        if(x[i] < x[ixMin]){    
            ixMin = i;
        }
        if(fabs(x[i] - x[ixMin]) < dTolerance && y[i] > y[ixMin]){    //x座標最小のもののなかでy座標最大のものにしておく
            ixMin = i;
        }
        if(x[i] > x[ixMax]){  
            ixMax = i;
        }
        if(fabs(x[i] - x[ixMax]) < dTolerance && y[i] < y[ixMax]){    //x座標最大のもののなかでy座標最小のものにしておく
            ixMin = i;
        }
    }
    
    double dDiameter = sqrt( (x[ixMax] - x[ixMin]) * (x[ixMax] - x[ixMin]) + (y[ixMax] - y[ixMin]) * (y[ixMax] - y[ixMin]) );

    int i = ixMin;
    int j = ixMax;
    
    while(j != ixMin || i != ixMax){
        if( (x[j+1] - x[j]) * (y[i+1] - y[i]) - (x[i+1] - x[i]) * (y[j+1] - y[j]) >= 0 ) {;    //j番目の辺(向き付)から見てi番目の辺(向き付)のなす角が反時計回り
            i++;
        } else {    //時計回り
            j++;
        }
        i %= n;    //nを越えないようにしておく
        j %= n;
        if (dDiameter < sqrt( (x[j] - x[i]) * (x[j] - x[i]) + (y[j] - y[i]) * (y[j] - y[i]) )){
            dDiameter = sqrt( (x[j] - x[i]) * (x[j] - x[i]) + (y[j] - y[i]) * (y[j] - y[i]) );
        }
    }

    printf("%lf", dDiameter);
    
    return 0;
}