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 PYTHON3):

Solution:
#!/usr/bin/env python3
# CGL_4_B: Convex Polygon - Diameter of a Convex Polygon

from operator import itemgetter
from math import sqrt


def distance(p0, p1):
    x0, y0 = p0
    x1, y1 = p1
    return sqrt((x1-x0)**2 + (y1-y0)**2)


def cross(p0, p1, p2, p3):
    x0, y0 = p0
    x1, y1 = p1
    x2, y2 = p2
    x3, y3 = p3
    return (x1-x0) * (y3-y2) - (x3-x2) * (y1-y0)


def rotating_calipers(ps):
    ps.sort(key=itemgetter(0, 1))
    upper = []
    lower = []
    for p in ps:
        while (len(upper) > 1
               and cross(upper[-2], upper[-1], upper[-1], p) <= 0):
            upper.pop()
        while (len(lower) > 1
               and cross(lower[-2], lower[-1], lower[-1], p) >= 0):
            lower.pop()

        upper.append(p)
        lower.append(p)

    nu, nl = len(upper), len(lower)
    i, j = 0, nl-1
    dist = 0.0
    while i < nu and j >= 0:
        d = distance(upper[i], lower[j])
        if dist < d:
            dist = d

        if i == nu-1:
            j -= 1
        elif j == 0:
            i += 1
        elif cross(upper[i], upper[i+1], lower[j-1], lower[j]) > 0:
            i += 1
        else:
            j -= 1

    return dist


def run():
    n = int(input())
    ps = []

    for _ in range(n):
        x, y = [float(f) for f in input().split()]
        ps.append((x, y))

    print("{:.10f}".format(rotating_calipers(ps)))


if __name__ == '__main__':
    run()