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<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
 
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
 
class Point{
	public:
		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 * (double a){ return Point(a * x, a * y);}
		Point operator / (double a){ return Point(x / a, y / a);}
 
		double abs(){ return sqrt(norm());}
		double norm(){ return x * x + y * y;}
 
		bool operator < (const Point &p) const{
			return x != p.x ? x < p.x : y < p.y;
		}
		bool operator > (const Point &p) const{
			return x != p.x ? x > p.x : y > p.y;
		}
		bool operator == (const Point &p) const{
			return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
		}
};
 
typedef Point Vector;
typedef vector<Point> Polygon;
 
double dot(Vector a, Vector b){
	return a.x * b.x + a.y * b.y;
}
double cross(Vector a, Vector b){
	return a.x * b.y - a.y * b.x;
}
 
int ccw(Point p0, Point p1, Point p2){
	Vector a = p1 - p0;
	Vector b = p2 - p0;
	if(cross(a, b) > EPS) return COUNTER_CLOCKWISE;
	if(cross(a, b) < -EPS) return CLOCKWISE;
	if(dot(a, b) < -EPS) return ONLINE_BACK;
	if(a.norm() < b.norm()) return ONLINE_FRONT;
 
	return ON_SEGMENT;
}
double getDistance(Point a, Point b){
	return (a - b).abs();
}
Polygon convex_hull(Polygon ps){
	int n = ps.size();
	int k = 0;
	sort(ps.begin(), ps.end());
	Polygon ret(2 * n);
	for(int i = 0; i < n; ret[k++] = ps[i++]){
		while(k >= 2 && ccw(ret[k - 2], ret[k - 1], ps[i]) <= 0 && ccw(ret[k - 2], ret[k - 1], ps[i]) != -2) --k;
	}
	for(int i = n - 2, t = k + 1; i >= 0; ret[k++] = ps[i--]){
		while(k >= t && ccw(ret[k - 2], ret[k - 1], ps[i]) <= 0 && ccw(ret[k - 2], ret[k - 1], ps[i]) != -2) --k;
	}
	ret.resize(k - 1);
	return ret;
}

int main(){
	int n;
	scanf("%d", &n);
	Polygon p(n);
	for(int i = 0; i < n; i++) scanf("%lf %lf", &p[i].x, &p[i].y);
	Polygon qs = convex_hull(p);
	if(qs.size() == 2){
		printf("%.10lf\n", getDistance(qs[0], qs[1]));
		return 0;
	}
	int l = 0, r = 0;
	for(int i = 0; i < qs.size(); i++){
		if(qs[i] < qs[l]) l = i;
		if(qs[i] > qs[r]) r = i;
	}
	double res = 0.0;
	int i = l, j = r;
	while(i != r || j != l){
		res = max(res, getDistance(qs[i], qs[j]));
		if(cross(qs[(i + 1) % n] - qs[i], qs[(j + 1) % n] - qs[j]) < 0){
			i = (i + 1) % qs.size();
		}else{
			j = (j + 1) % qs.size();
		}
	}
	printf("%.10lf\n", res);
	return 0;
}