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 <cstdint>
#include <algorithm>
#include <vector>
#include <cmath>
#include <tuple>
#include <iomanip>

double area(const std::vector<std::tuple<double, double> > &vs, int64_t p, int64_t q) {
    auto n = vs.size();
    auto vx1 = std::get<0>(vs[(p+1) % n]) - std::get<0>(vs[p]);
    auto vy1 = std::get<1>(vs[(p+1) % n]) - std::get<1>(vs[p]);

    auto vx2 = std::get<0>(vs[(q+1) % n]) - std::get<0>(vs[q]);
    auto vy2 = std::get<1>(vs[(q+1) % n]) - std::get<1>(vs[q]);

    return vx1 * vy2 - vx2 * vy1;
}

double len2(const std::vector<std::tuple<double, double> > &vs, int64_t p, int64_t q) {
    auto dx = std::get<0>(vs[p]) - std::get<0>(vs[q]);
    auto dy = std::get<1>(vs[p]) - std::get<1>(vs[q]);

    return dx*dx + dy*dy;
}

int main() {
    int64_t n;

    std::cin >> n;
    
    std::vector<std::tuple<double, double> > vs(n);

    int64_t p = 0, q = 0;
    for (int64_t i = 0; i < n; ++i) {
        std::cin >> std::get<0>(vs[i]) >> std::get<1>(vs[i]);

        if (std::get<0>(vs[i]) < std::get<0>(vs[p])) {
            p = i;
        }
        if (std::get<0>(vs[i]) > std::get<0>(vs[q])) {
            q = i;
        }
    }

    double ans = len2(vs, p, q);
    for (int64_t i = 0; i < 2*n; ++i) {
        if (area(vs, p, q) > 0) {
            q = (q+1) % n;
        } else {
            p = (p+1) % n;
        }
        ans = std::max(ans, len2(vs, p, q));
    }

    std::cout << std::fixed << std::setprecision(12) << std::sqrt(ans) << std::endl;
    
    return 0;
}