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 <cmath>
#include <iostream>
#include <complex>
#include <vector>
using namespace std;

typedef complex<double> point;
double cross(const point& a, const point& b) {
	return imag(conj(a)*b);
}

typedef vector<point> polygon;
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
#define diff(P, i) (next(P, i) - curr(P, i))
double convex_diameter(const polygon &pt) {
	const int n = pt.size();
	int is = 0, js = 0;
	for (int i = 1; i < n; ++i) {
		if (imag(pt[i]) > imag(pt[is])) is = i;
		if (imag(pt[i]) < imag(pt[js])) js = i;
	}
	double maxd = norm(pt[is]-pt[js]);

	int i, maxi, j, maxj;
	i = maxi = is;
	j = maxj = js;
	do {
		if (cross(diff(pt,i), diff(pt,j)) >= 0) j = (j+1) % n;
		else i = (i+1) % n;
		if (norm(pt[i]-pt[j]) > maxd) {
			maxd = norm(pt[i]-pt[j]);
			maxi = i; maxj = j;
		}
	} while (i != is || j != js);
	return maxd; /* farthest pair is (maxi, maxj). */
}

int main() {
	int n;
	while (cin >> n) {
		polygon pol(n);
		for (auto& p : pol) {
			double x, y;
			cin >> x >> y;
			p = point(x, y);
		}
		printf("%.10lf\n", sqrt(convex_diameter(pol)));
	}
	return 0;
}