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;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<int,int> pint;

#define eps (1e-10)
struct Point{
    double x,y;
    Point(){}
    Point(double x,double y):x(x),y(y){}
    Point operator+(Point p) {return Point(x+p.x,y+p.y);}
    Point operator-(Point p) {return Point(x-p.x,y-p.y);}
    Point operator*(double k){return Point(x*k,y*k);}
    double norm(){return x*x+y*y;}
    double abs(){return sqrt(norm());}
    bool operator == (const Point &p) const{
    return fabs(x-p.x)<eps && fabs(y-p.y)<eps;
  }
  double dot(Point p){return x*p.x+y*p.y;}
  double det(Point p){return x*p.y-y*p.x;}
};
bool cmp_x(const Point& p,const Point& q){
  if(p.x!=q.x) return p.x<q.x;
  return p.y<q.y;
}
bool cmp_y(const Point& p,const Point& q){
  if(p.y!=q.y) return p.y<q.y;
  return p.x<q.x;
}
vector<Point> convex_hull(Point* ps,int n){
    sort(ps,ps+n,cmp_x);
    int k=0;
    vector<Point> qs(n*2);
    rep(i,n){
        while(k>1&&(qs[k-1]-qs[k-2]).det(ps[i]-qs[k-1])<0) --k;//<=:exclusion online
        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 distance(Point p,Point q){
    return (p-q).abs();
}
//convex_diameter
int main(){
    int n;
    //vector<Point> qs=convex_hull(ps,n);
    cin>>n;
    double xi,yi;
    vector<Point> qs(n);
    rep(i,n){
        cin>>xi>>yi;
        qs[i]=Point(xi,yi);
    }
    if(n==2){
        cout<<fixed<<setprecision(12)<<distance(qs[0],qs[1])<<endl;
        return 0;
    }
    int i=0,j=0;
    rep(k,n){
        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,distance(qs[i],qs[j]));
        if((qs[(i+1)%n]-qs[i]).det(qs[(j+1)%n]-qs[j])<0){
            i=(i+1)%n;
        }
        else{
            j=(j+1)%n;
        }
    }
    cout<<fixed<<setprecision(12)<<res<<endl;
    return 0;
}