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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <cctype>
#include <complex>
#include <regex>

using namespace std;

#define C_MAX(a, b) ((a)>(b)?(a):(b))
#define SHOW_VECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOW_MAP(v){std::cerr << #v << endl; for(const auto& xxx: v){std::cerr << xxx.first << " " << xxx.second << "\n";}}

#define EPS 1e-8
#define EQ (abs((a) - (b)) < EPS)
#define re() real()
#define im() imag()

inline int signum(double x) { return abs(x) < EPS ? 0 : x > 0 ? 1 : -1; };

typedef complex<double> P;
typedef pair<P, P> L;
typedef vector<P> Poly;

//constないとError
namespace std {
    bool operator<(const P &a, const P &b) {
        return a.real() == b.real() ? a.imag() < b.imag() : a.real() < b.real();
    }
}

double dot(P a, P b) {
    return a.real() * b.real() + a.imag() * b.imag();
}

double cross(P a, P b) {
    return a.real() * b.imag() - a.imag() * b.real();
}

int ccw(P a, P b, P c) {
    b -= a;
    c -= a;
    int sign = signum(cross(b, c));
    if (abs(sign) == 1) return sign;
    if (signum(dot(b, c)) < 0) return -2;
    if (abs(b) < abs(c)) return 2;
    return 0;
}

double poly_diameter(Poly poly) {
    int n = poly.size();
    if (n == 2) return abs(poly[0] - poly[1]);

    int i = 0, j = 0;
    for (int k = 0; k < n; k++) {
        if (!(poly[i] < poly[k])) i = k;
        if (poly[j] < poly[k]) j = k;
    }

    double res = 0;
    int si = i, sj = j;
    while (i != sj || j != si) {
        res = max(res, abs(poly[i] - poly[j]));
        if (cross(poly[(i + 1) % n] - poly[i], poly[(j + 1) % n] - poly[j]) < 0) i = (i + 1) % n;
        else j = (j + 1) % n;
    }

    return res;
}

int main() {

    int N;
    cin >> N;

    Poly poly(N);
    for (int i = 0; i < N; i++) {
        double x, y;
        cin >> x >> y;
        poly[i] = P(x, y);
    }

    cout << fixed << setprecision(10) << poly_diameter(poly) << endl;

}