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;
//types
typedef long long ll;
typedef pair<int,int> pii;
//input
bool SR(int &_x){return scanf("%d",&_x)==1;}bool SR(ll &_x){return scanf("%lld",&_x)==1;}
bool SR(double &_x){return scanf("%lf",&_x)==1;}bool SR(char *_s){return scanf("%s",_s)==1;}
bool RI(){return true;}
template<typename I,typename... T>bool RI(I &_x,T&... _tail){return SR(_x) && RI(_tail...);}
//output
void SP(const int _x){printf("%d",_x);}void SP(const ll _x){printf("%lld",_x);}
void SP(const double _x){printf("%.16lf",_x);}void SP(const char *s){printf("%s",s);}
void PL(){puts("");}
template<typename I,typename... T>void PL(const I _x,const T... _tail)
{SP(_x);if(sizeof...(_tail)) putchar(' ');PL(_tail...);}
//macro
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(),(x).end()
#define REP(i,n) for(int i=0;i<int(n);i++)
#define REP1(i,a,b) for(int i=(a);i<=int(b);i++)
#define PER1(i,a,b) for(int i=(a);i>=int(b);i--)
#define pb push_back
#define mkp make_pair
#define F first
#define S second
//debug
#ifdef darry140
template<typename A,typename B>
ostream& operator <<(ostream&_s, const pair<A,B> &_p){return _s<<"("<<_p.F<<","<<_p.S<<")";}
template<typename It>
ostream& _OUTC(ostream &_s,It _b,It _e)//container
{
    _s<<"{";
    for(auto _it=_b;_it!=_e;_it++) _s<<(_it==_b?"":" ")<<*_it;
    _s<<"}";
    return _s;
}
template<typename A,typename B>
ostream& operator <<(ostream&_s, const map<A,B> &_c){return _OUTC(_s,ALL(_c));}
template<typename T>
ostream& operator <<(ostream&_s, const set<T> &_c){return _OUTC(_s,ALL(_c));}
template<typename T>
ostream& operator <<(ostream&_s, const vector<T> &_c){return _OUTC(_s,ALL(_c));}
template<typename I>
void _DOING(const char *_s,I&& _x){cerr<<_s<<"="<<_x<<endl;}//without ','
template<typename I,typename... T>
void _DOING(const char *_s,I&& _x,T&&... _tail)//with ','
{
    int _c=0;
    static const char _bra[]="({[";
    static const char _ket[]=")}]";
    while(*_s!=',' || _c!=0)//eg. mkp(a,b)
    {
        if(strchr(_bra,*_s)) _c++;
        if(strchr(_ket,*_s)) _c--;
        cerr<<*_s++;
    }
    cerr<<"="<<_x<<", ";
    _DOING(_s+1,_tail...);
}
#define debug(...) do{\
    fprintf(stderr,"%s:%d - ",__PRETTY_FUNCTION__,__LINE__);\
    _DOING(#__VA_ARGS__,__VA_ARGS__);\
}while(0)
#else
#define debug(...)
#endif
//}}}
typedef long double ld;
struct Point
{
    ld x,y;
    Point():x(0),y(0){}
    Point(ld _x,ld _y):x(_x),y(_y){}
    Point operator +(const Point &p) const
    {return Point(x+p.x,y+p.y);}
    Point operator -(const Point &p) const
    {return Point(x-p.x,y-p.y);}
    ld operator *(const Point &p) const
    {return x*p.x+y*p.y;}
    ld operator %(const Point &p) const
    {return x*p.y-y*p.x;}   
    bool operator <(const Point &p) const
    {return tie(y,x) < tie(p.y,p.x);}
    bool operator ==(const Point &p) const
    {return tie(y,x) == tie(p.y,p.x);}
    Point operator /(const ld &l) const
    {return Point(x/l,y/l);}
    Point operator *(const ld &l) const
    {return Point(x*l,y*l);}
    ld len2() const{return x*x+y*y;}
    ld dis2(const Point &a)const{return (*this-a).len2();}
};
ostream& operator <<(ostream&_s, const Point &_c){return _s<<"("<<_c.x<<","<<_c.y<<")";}
int main()
{
    int n;
    while(RI(n) && n)
    {
        vector<Point> v(n);
        REP(i,n)
        {
            double x,y;RI(x,y);
            v[i]=Point(x,y);
        }

        const int a=max_element(ALL(v))-v.begin(),b=min_element(ALL(v))-v.begin();

        ld ans=0;
        int p=a,q=b;
        while(1)
        {
            ans=max(ans,v[p].dis2(v[q]));
            int pp=(p+1)%n,qq=(q+1)%n;
            if((v[pp]-v[p])%(v[qq]-v[q])<0) p=pp;
            else q=qq;
            if(p==b && q==a) break;
        }
        PL((double)sqrt(ans));
        //REP(i,n) PL(far[i]+1);
    }
    return 0;
}