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:
#pragma GCC opmize(2)
#pragma GCC opmize(2)
#include<bits/stdc++.h>
#define mem(a) memset(a, 0, sizeof a)
#define Buff ios::sync_with_stdio(false)
using namespace std;

const double INF = 1e9+7;
const int N = 1e5+7;
const double PI = acos(-1);
const double eps = 1e-8;
int dcmp(double x)
{
    if(fabs(x) < eps)   return 0;
    return x < 0 ? -1 : 1;
}
//直线，向量
struct Point
{
    double x;
    double y;
    void read() {scanf("%lf%lf", &x, &y);}
    void out()  {printf("(%.6lf, %.6lf)\n", x, y);}
    Point(double x=0, double y=0):x(x), y(y) {}
};
typedef Point Vector;
double operator * (Vector v, Vector w)                   {return v.x*w.x+v.y*w.y;}//点乘
double operator ^ (Vector v, Vector w)                   {return v.x*w.y-v.y*w.x;}//叉乘
Vector operator + (Vector v, Vector w)                   {return Vector(v.x+w.x, v.y+w.y);}
Vector operator - (Point A, Point B)                     {return Vector(A.x-B.x, A.y-B.y);}
Vector operator * (Vector v, double k)                   {return Vector(v.x*k, v.y*k);}
Vector operator / (Vector v, double k)                   {return Vector(v.x/k, v.y/k);}
bool operator < (const Point & A, const Point & B)       {return A.y < B.y || (A.x == B.x && A.y < B.y);}
bool operator == (const Point & A, const Point & B)      {return !dcmp(A.x-B.x) && !dcmp(A.y-B.y);}
double length(Vector v)                                  {return sqrt(v*v);}
double sqr(Vector v)                                     {return v*v;}
Point p[N], sta[N];
int n, top;
bool cmp(Point a, Point b)
{
    double t = (a - p[0]) ^ (b - p[0]);
    if(t < 0)   return false;
    if(!t && length(a - p[0]) > length(b - p[0]))   return false;
    return true;
}
void graham()
{
    sort(p + 1, p + n, cmp);
    int t = n - 1;
    while(!((p[n-1] - p[0]) ^ (p[t] - p[0]))) t --;
    reverse(p + t + 1, p + n);
    sta[top ++] = p[0]; sta[top ++] = p[1]; p[n ++] = p[0];
    for(int i = 2; i < n; i ++)
    {
        while(top > 1 && dcmp((sta[top-1] - sta[top-2]) ^ (p[i] - sta[top-2])) <= 0)     top --;
        sta[top ++] = p[i];
    }
    top --;
}
double diame()
{
    int i, j, k;
    double res, t;
    graham();
    sta[top] = sta[0], res = 0.0, j = 1;
    for(int i = 0; i < top; i ++)
    {
        while(dcmp(fabs((sta[i] - sta[j]) ^ (sta[i+1] - sta[j])) - fabs((sta[i] - sta[j+1]) ^ (sta[i+1] - sta[j+1]))) < 0)
            j = (j + 1) % top;
        t = sqr(sta[i] - sta[j]);
        if(dcmp(t - res) > 0)    res = t;
    }
    return sqrt(res);
}
int main()
{
    scanf("%d", &n);
    for(int i = 0; i < n; i++)
    {
        double a, b;
        scanf("%lf %lf", &a, &b);
        p[i] = {a, b};
        if(p[i] < p[0]) swap(p[i], p[0]);
    }
    printf("%.8f\n", diame());
//    int x, y;
//    graham();
//    double t, res = 0;
//    for(int i = 0; i < top; i++)
//        for(int j = 0; j < top; j ++)
//        {
//            t = sqr(sta[i] - sta[j]);
//            if(dcmp(t - res) > 0)
//            {
//                res = t;
//                x = i, y = j;
//            }
//        }
//    printf("%.8f\n", sqrt(res));
//    printf("%d %d\n", x, y);
//    printf("%.8f\n", sqrt(sqr(sta[x] - sta[y])));
    return 0;
}