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 <iomanip>
#include <math.h>
#include <vector>
#include <algorithm>

using namespace std;

const double eps = 1e-15;

class Point
{
public:
    double x, y;
    Point() : x(0), y(0) {}
    Point(double _x, double _y) : x(_x), y(_y) {}
};

istream& operator >> (istream& in, Point& P)
{
    in >> P.x >> P.y;
    return in;
}

ostream& operator << (ostream& out, const Point& P)
{
    out << P.x << " " << P.y;
    return out;
}

ostream& operator << (ostream& out, vector<Point> vP)
{
    size_t n = vP.size();
    for (int i = 0; i < n; ++i) {
        out << vP[i] << endl;
    }
    return out;
}

double Dist(const Point& P, const Point& Q)
{
    double dx = P.x - Q.x;
    double dy = P.y - Q.y;
    return sqrt(dx * dx + dy * dy);
}

double FindDiameter(const vector<Point>& vP)
{
    int i = 0, j = 1;
    double Res = Dist(vP[i], vP[j]);

    while (1) {
        bool bUpdate = false;
        while (1) {
            if (j < vP.size() - 1 && Dist(vP[i], vP[j]) < Dist(vP[i], vP[j+1])) {
                Res = max(Res, Dist(vP[i], vP[j+1]));
                j++;
                bUpdate = true;
            } else {
                break;
            }
        }
        while (1) {
            if (Dist(vP[i], vP[j]) < Dist(vP[i+1], vP[j])) {
                Res = max(Res, Dist(vP[i+1], vP[j]));
                i++;
                bUpdate = true;
            } else {
                break;
            }
        }
        if (j == vP.size() - 1) break;
        if (!bUpdate) ++i;
    }


    return Res;
}

int main()
{
    int n;
    cin >> n;
    vector<Point> vP(n);
    for (int i = 0; i < n; ++i) {
        cin >> vP[i];
    }

    cout << fixed << setprecision(10);
    cout << FindDiameter(vP);

    return 0;
}