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>           // printf(), scanf()
#include <cmath>            // sqrt()

#define MAX_N 80000
using namespace std;

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); }
};

typedef Point Vector;

Point qs[MAX_N];
int n;

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;
}

double
dist(Vector a, Vector b)
{
	return dot(a - b, a - b);
}

bool cmp_func(const Point &l, const Point &r)
{
	return l.x != r.x ? l.x < r.x : l.y < r.y;
}

double
solve()
{
	int i = 0, j = 0; // ?????????????????????????????????
	// x ??????????????????????????????????±???????
	for (int k = 0; k < n; ++k)
	{
		if (!cmp_func(qs[i], qs[k]))
			i = k;

		if (cmp_func(qs[j], qs[k]))
			j = k;
	}

	double res = 0;
	int si = i, sj = j;
	while (i != sj || j != si) // ????????? 180 ??????????????????
	{
		double t = dist(qs[i], qs[j]);
		if (t > res)
			res = t;

		// ??? i-(i+1) ?????????????????¨??? j-(j+1) ???????????????????????????????????????????????????
		if (cross(qs[(i + 1) % n] - qs[i], qs[(j + 1) % n] - qs[j]) < 0)
			i = (i + 1) % n; // ??? i-(i+1) ??????????????????????????????
		else
			j = (j + 1) % n; // ??? j-(j+1) ??????????????????????????????
	}

	return sqrt(res);
}

int
main(int argc, char** argv)
{

	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
		scanf("%lf %lf", &qs[i].x, &qs[i].y);

	printf("%.12f\n", solve());
	return 0;
}