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 <vector>
#include <complex>
#include <algorithm>
#include <iomanip>

using namespace std;

const double eps = 1e-10;
typedef complex<double> Point;

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

typedef vector<Point> Polygon;

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

double convexdiameter(const Polygon& ch){
    auto comp = [](const Point& a, const Point& b){
        return make_pair(imag(a), real(a)) < make_pair(imag(b), real(b));
    };
    int is = max_element(ch.begin(), ch.end(), comp) - ch.begin(),
        js = min_element(ch.begin(), ch.end(), comp) - ch.begin();
    double res = abs(ch[is] - ch[js]);
    int i = is, j = js, maxi = is, maxj = js;
    do{
        ((0 <= cross(next(ch, i) - ch[i], next(ch, j) - ch[j])? j: i) += 1) %= (int)ch.size();
        double d = abs(ch[i] - ch[j]);
        if(res + eps <= d)res = d, maxi = i, maxj = j;
    }while(i != is || j != js);
    return res;
}

int main(){
    int n;
    cin >> n;
    Polygon g;
    while(n--){
        double x, y;
        cin >> x >> y;
        g.emplace_back(x, y);
    }
    cout << fixed << setprecision(12) << convexdiameter(g) << '\n';
    return 0;
}