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 <algorithm>

using namespace std;

template<class T>
struct Vec2
{
	Vec2(){}
	Vec2(T _x, T _y) : x(_x), y(_y) {}

	Vec2 operator+(const Vec2& rhs) const { return Vec2(x + rhs.x, y + rhs.y); }
	Vec2 operator-(const Vec2& rhs) const { return Vec2(x - rhs.x, y - rhs.y); }
	Vec2 operator*(T s) const { return Vec2(x*s, y*s); }
	T dot(const Vec2& rhs) const { return x*rhs.x + y*rhs.y; }
	T cross(const Vec2& rhs) const { return x*rhs.y - y*rhs.x; }
	T sqlength() const { return x*x + y*y; }
	bool operator<(const Vec2& rhs) const
	{
		if (x != rhs.x) return x < rhs.x;
		return y < rhs.y;
	}

	T x;
	T y;
};

typedef Vec2<double> VecD;

template<class T>
T cross(const Vec2<T> &O, const Vec2<T> &A, const Vec2<T> &B)
{
	return (A - O).cross(B - O);
}

int main()
{
	int N;
	scanf("%d", &N);

	static VecD P[80000];
	int iMinY = 0, iMaxY = 0;
	for (int i = 0; i < N; i++) {
		scanf("%lf%lf", &P[i].x, &P[i].y);
		if (P[i].y > P[iMaxY].y) {
			iMaxY = i;
		}
		if (P[i].y < P[iMinY].y) {
			iMinY = i;
		}
	}

	int i = iMaxY, j = iMinY;
	double diameter = (P[iMaxY] - P[iMinY]).sqlength();
	do {
		int i2 = (i + 1) % N, j2 = (j + 1) % N;
		double aadVecDir[2][2] = { 0 };
		VecD dir0 = P[i2] - P[i];
		VecD dir1 = P[j2] - P[j];
		if (dir0.cross(dir1) > 0) {
			j = j2;
		}
		else {
			i = i2;
		}

		double dDist = (P[i] - P[j]).sqlength();
		if (dDist > diameter) {
			diameter = dDist;
		}
	} while (i != iMaxY || j != iMinY);

	printf("%.10lf\n", sqrt(diameter));
	return 0;
}