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<vector>
#include<algorithm>
#include<utility>
#include<numeric>
#include<iostream>
#include<array>
#include<string>
#include<sstream>
#include<stack>
#include<queue>
#include<list>
#include<functional>
#define _USE_MATH_DEFINES

#include<math.h>
#include<map>

#define INF 200000000

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;

struct P
{
	double x, y;
	P(double x, double y) :x(x), y(y) {}
	P() :P(0, 0) {}
	P operator+(const P& v)const
	{
		return P(x + v.x, y + v.y);
	}
	P operator-(const P& v)const
	{
		return P(x - v.x, y - v.y);
	}
	P operator*(const double v)const
	{
		return P(x*v, y*v);
	}
	bool operator==(const P& v)const
	{
		return abs(x - v.x) <= 0.0000000000001&&abs(y - v.y) <= 0.00000000000001;
	}
	bool operator!=(const P& v)const
	{
		return abs(x - v.x) > 0.0000000000001 || abs(y - v.y) > 0.00000000000001;
	}

	double dot(const P& v)const
	{
		return x*v.x + y*v.y;
	}
	double cross(const P& v)const
	{
		return x*v.y - y*v.x;
	}
	double length()const
	{
		return sqrt(x*x + y*y);
	}
	double length2()const
	{
		return x*x + y*y;
	}
	
	bool operator<(const P& v)const
	{
		return x<v.x || (x == v.x) && y < v.y;
	}
	bool operator>(const P& v)const
	{
		return x<v.x || (x == v.x) && y < v.y;
	}
};

int ccw(P a, P b, P c) 
{
	b = b - a; c = c - a;
	if (b.cross(c) > 0)   return +1;			// counter clockwise
	if (b.cross(c) < 0)   return -1;			// clockwise
	if (b.dot(c) < 0)     return +2;			// c--a--b on line
	if (b.length2() < c.length2()) return -2;   // a--b--c on line
	return 0;
}

double CalcDiameter(vector<P>& points)
{
	int n = points.size();
	int is = 0, js = 0;
	for (int i = 1; i != n; i++)
	{
		if (points[i].y > points[is].y)
		{
			is = i;
		}
		if (points[i].y < points[js].y)
		{
			js = i;
		}
	}
	double maxd = (points[is] - points[js]).length();

	int i, maxi, j, maxj;
	i = maxi = is;
	j = maxj = js;
	do
	{
		if ((points[(i + 1) % n] - points[i]).cross(points[(j + 1) % n] - points[j]) >= 0)
		{
			j = (j + 1) % n;
		}
		else
		{
			i = (i + 1) % n;
		}
		if (maxd < (points[i] - points[j]).length())
		{
			maxd = (points[i] - points[j]).length();
			maxi = i;
			maxj = j;
		}
	} while (i != is || j != js);
	return maxd;
}

vector<P> points;

int main()
{
	points.reserve(80000);
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;

	for (int i = 0; i < n; i++)
	{
		double x, y;
		cin >> x >> y;
		points.push_back(P(x, y));
	}

	printf("%.10lf\n", CalcDiameter(points));
	
	return 0;
}