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<bits/stdc++.h>
using namespace std;

const double EPS = 1e-8;
const double INF = 1e12;
const double PI = acos(-1);

using Point = complex<double>;
using Polygon = vector<Point>;

inline int sgn(const double &a) { return (a < -EPS ? -1 : (a > EPS ? 1 : 0)); }

inline bool eq(const Point &a, const Point &b) { return abs(a - b) < EPS; }

namespace std {
inline bool operator<(const Point &a, const Point &b) {
    if (sgn(a.real() - b.real()))
        return sgn(a.real() - b.real()) < 0;
    return sgn(a.imag() - b.imag()) < 0;
}
} // namespace std

double dot(const Point &a, const Point &b) { return real(conj(a) * b); }

double det(const Point &a, const Point &b) { return imag(conj(a) * b); }

struct Line {
    Point p1, p2;

    Line(Point p1 = Point(), Point p2 = Point()) : p1(p1), p2(p2) {}

    bool operator<(const Line &rhs) const {
        if (eq(p2, rhs.p2))
            return p1 < rhs.p1;
        return p2 < rhs.p2;
    }
    bool operator==(const Line &rhs) const {
        return (eq(p1, rhs.p1) && eq(p2, rhs.p2)) ||
               (eq(p1, rhs.p2) && eq(p2, rhs.p1));
    }
};

inline Point curr(const Polygon &p, const int &i) { return p[i % p.size()]; }

inline Point next(const Polygon &p, const int &i) {
    return p[(i + 1) % p.size()];
}

inline Point prev(const Polygon &p, const int &i) {
    return p[(i + p.size() - 1) % p.size()];
}

double convex_diameter(const Polygon &pg) {
    const int n = pg.size();
    int ps = 0, qs = 0;
    for(int i=1;i<n;i++){
        if(pg[i].imag() > pg[ps].imag())ps = i;
        if(pg[i].imag() < pg[qs].imag())qs = i;
    }
    double diameter = abs(pg[ps] - pg[qs]);

    int p = ps, q = qs, maxp = ps, maxq = qs;
    do {
        if(sgn(det(next(pg, p)-curr(pg, p), next(pg, q)-curr(pg, q))) >= 0)
            q = (q+1) % n;
        else
            p = (p+1) % n;
        double d = abs(pg[p] - pg[q]);
        if(sgn(d - diameter) > 0){
            diameter = d;
            maxp = p;
            maxq = q;
        }
    }while(p != ps || q != qs);
    return diameter;
}

int main(){
    int n;
    cin >> n;
    Polygon pg;
    for(int i=0;i<n;++i){
        double x, y;
        cin >> x >> y;
        pg.push_back(Point(x, y));
    }

    printf("%.10f\n", convex_diameter(pg));

    return 0;
}