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 <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
const int MAXN = 1e5 + 10;

struct vec {
    double x, y;
    double p;
    vec() {}
    vec(double a, double b)
    {
        x = a, y = b;
    }
    bool operator>(const vec a) const
    {
        return x == a.x ? y > a.y : x > a.x;
    }
    vec operator-(const vec a) const
    {
        return vec(x - a.x, y - a.y);
    }
    vec operator+(const vec a) const
    {
        return vec(x + a.x, y + a.y);
    }
    bool operator<(const vec a) const
    {
        return y == a.y ? x < a.x : y < a.y;
    }
    friend ostream& operator<<(ostream& out, vec& a)
    {
        cout << a.x << ' ' << a.y;
        return out;
    }
    friend istream& operator>>(istream& in, vec& a)
    {
        in >> a.x >> a.y;
        return in;
    }
} p[MAXN];
int n;
double chaji(vec A, vec B)
{
    return A.x * B.y - A.y * B.x;
}
double xuanzhuan(vec a, vec b, vec c)
{
    return chaji(b - a, c - a);
}
double changdu(vec a) //长度
{
    return sqrt(a.x * a.x + a.y * a.y);
}
vec q[MAXN];
double tubao_zhijing(int tail) //求出直径
{
    double re = 0;
    if (tail == 1) //仅有两个点
        return changdu(q[1] - q[0]);
    q[0] = q[n]; //把第一个点放到最后
    //q[tail+1]=q[1];
    for (int i = 0, j = 2; i < tail; i++) //枚举边
    {
        while (xuanzhuan(q[i], q[i + 1], q[j]) < xuanzhuan(q[i], q[i + 1], q[j + 1]))
            j = (j + 1) % tail;
        re = max(re, max(changdu(q[j] - q[i]), changdu(q[j] - q[i + 1])));
    }
    return re;
}

int main()
{
   // freopen("txt.txt", "w", stdout);
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> q[i];
    int tail = n;
    printf("%.6f\n", tubao_zhijing(tail));
    return 0;
}