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 <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <vector>
#define EPS 1e-10
using namespace std;
typedef long long ll;
struct Point{
	double x,y;
	Point(double x = 0,double y = 0): 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 - (){
		return Point(-x,-y);
	}
	Point operator * (double lambda){
		return Point(x * lambda,y * lambda);
	}
	Point operator / (double lambda){
		return Point(x / lambda,y / lambda);
	}
	Point rot(double theta){
		return Point(cos(theta) * x - sin(theta) * y,
								sin(theta) * x + cos(theta) * y);
	}
	double norm(){
		return x * x + y * y;
	}
	double abs_(){
		return sqrt(norm());
	}
	bool operator == (const Point p)const
	{
		return abs(x - p.x) < EPS && abs(y - p.y) < EPS;
	}
	bool operator < (const Point p)const
	{
		if(abs(x - p.x) < EPS) return y < p.y;
		return x < p.x;
	}
};
typedef Point Vector;
double dot(Vector a,Vector b){
	return a.x * b.x + a.y * b.y;
}
double det(Vector a,Vector b){
	return a.x * b.y - a.y * b.x;
}
typedef vector <Point> Polygon;
double diameter(Polygon po){
	int n = po.size(), minp = 0, maxp = 0;
	for(int i=1;i<n;i++){
		if(po[i] < po[minp]) minp = i;
		if(po[maxp] < po[i]) maxp = i;
	}
	int i = minp, j = maxp;
	double ans = 0.0;
	while(i != maxp || j != minp){
		ans = max(ans,(po[i] - po[j]).abs_());
		if(det(po[(i + 1) % n] - po[i], po[(j + 1) % n] - po[j]) < EPS){
			i = (i + 1) % n;
		}else{
			j = (j + 1) % n;
		}
	}
	return ans;
}
int n; Polygon g;
int main(){
	scanf("%d",&n);
	g.resize(n);
	for(int i=0;i<n;i++) scanf("%lf%lf",&g[i].x,&g[i].y);
	printf("%.10f\n",diameter(g));
	return 0;
}