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<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<list>
#include<string>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<ctime>
using namespace std;

typedef long long ll;

bool debug = false;
const double eps = 1e-10;
clock_t START, END;

struct Point {
	double x, y;
	Point(double x = 0, double y = 0) :x(x), y(y) {}
};
typedef Point Vector;
Vector operator - (const Point& A, const Point& B) { return Vector(A.x - B.x, A.y - B.y); }
int dcmp(double x) { if (fabs(x) < eps)return 0; else return x < 0 ? -1 : 1; }
double Cross(Vector A, Vector B) { return A.x * B.y - A.y * B.x; }
double Dot(const Vector& A, const Vector& B) { return A.x * B.x + A.y * B.y; }
double Distance(Point u, Point v) {
	return sqrt(fabs((u.x - v.x) * (u.x - v.x)) + fabs((u.y - v.y) * (u.y - v.y)));
}

int main(void)
{
	if (debug) {
		START = clock();
		freopen("in29.txt", "r", stdin);
		freopen("out.txt", "w", stdout);
	};
	int n;
	double x, y, ans;
	vector<Point> p;
	cin >> n;
	for (int i = 0; i < n; i++) {
		scanf("%lf%lf", &x, &y);
		p.push_back(Point(x, y));
	}
	p.push_back(p[0]);
	for (int u = 0, v = 1; u < n; u++) {
		bool rev = false;
		for (;;) {
			int diff = dcmp(Cross(p[u + 1] - p[u], p[v + 1] - p[v]));
			if (diff)
				rev = true;
			if (diff <= 0 && rev) {
				ans = max(ans, Distance(p[u], p[v]));
				if (diff == 0)
					ans = max(ans, Distance(p[u], p[v + 1]));
				break;
			}
			v = (v + 1) % n;
		}
	}
	printf("%.6lf\n", ans);
	if (debug) {
		END = clock();
		double endtime = (double)(END - START) / 1000;
		printf("total time = %lf s", endtime);
	}
	return 0;
}