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:
/* Header {{{ */
#include <bits/stdc++.h>
using namespace std;

typedef long long readtype;
typedef long long var;
typedef long double let;

readtype read() {
  readtype a = 0, c = getchar(), s = 0;
  while (!isdigit(c)) s |= c == '-', c = getchar();
  while (isdigit(c)) a = a * 10 + c - 48, c = getchar();
  return s ? -a : a;
}

#ifdef LOCAL_LOGGER
#define logger(...) fprintf(stderr, __VA_ARGS__)
#define abortif(v, ...) if (v) {logger("Error in Line %d, Function '%s()'.\nInfo: ", __LINE__, __FUNCTION__); logger(__VA_ARGS__); exit(0);}
#else
#define logger(...);
#define abortif(v, ...);
#endif
/* }}} */

const let EPS = 1e-8;

int sign(let x) { return (x < -EPS) ? -1 : (x > EPS ? 1 : 0); }

struct Point {
  let x, y;

  friend Point operator - (Point a, Point b) {
    return (Point) {a.x - b.x, a.y - b.y};
  }

  friend let Times(Point a, Point b) {
    return a.x * b.y - a.y * b.x;
  }

  let dist() {
    return sqrt(x * x + y * y);
  }

  Point Rotate(Point k) {
    let z = k.dist();
    return Rotate(k.y / z, k.x / z);
  }

  Point Rotate(let sink, let cosk) {
    return (Point) {
      x * cosk - y * sink, x * sink + y * cosk
    };
  }

  friend let Dist(Point a, Point b) { return (a - b).dist(); }
};

typedef Point Vec;

struct Line {
  Point p;
  Vec v;
  Line(Point a, Point b) { p = a, v = b - a; }

  friend let Dist(Line l, Point p) {
    return (p - l.p).Rotate(l.v).y;
  }
};

struct Polygon {
  vector<Point> p;

  Point &operator [] (int k) { return p[k]; } 
  int size() { return p.size(); }
  void push(Point t) { p.push_back(t); }

  friend let ConvexDiameter(Polygon poly) {

    int p = 0;
    let res = 0;
    for (int i = 0; i < poly.size(); ++i) {
      let tdist = Dist(poly[i], poly[p]);
      while (true) {
        res = max(res, tdist);
        int np = (p + 1 == poly.size()) ? 0 : p + 1;
        let nxdist = Dist(poly[i], poly[np]);
        if (sign(nxdist - tdist) < 0) break;
        p = np, tdist = nxdist;
      }
    }

    // for (int i = 0; i < poly.size(); ++i) {
    //   for (int j = 0; j < poly.size(); ++j) {
    //     if (sign(Dist(poly[i], poly[j]) - res) > 0) {
    //       printf("%d %d\n", i, j);
    //     }
    //   }
    // }

    return res;
  }
};

Point ReadPoint() {
  Point p;
  scanf("%Lf%Lf", &p.x, &p.y);
  return p;
}

Polygon ReadPolygon() {
  Polygon poly;
  int g = read();
  for (int i = 1; i <= g; ++i) 
    poly.push(ReadPoint());
  return poly;
}

int main() {
// #ifndef ONLINE_JUDGE
//   freopen("CGL_4_B.in", "r", stdin);
//   freopen("CGL_4_B.out", "w", stdout);
// #endif
// #ifdef LOCAL_LOGGER
//   freopen("CGL_4_B.log", "w", stderr);
// #endif
  Polygon poly = ReadPolygon();
  printf("%.8Lf\n", ConvexDiameter(poly));
  return 0;
}

/* ==== Makefile ==== {{{
CompileAndRun:
	make Compile
	make Run

Compile:
	g++ -o CGL_4_B CGL_4_B.cpp -g -Wall -DLOCAL_LOGGER

CompileUF:
	g++ -o CGL_4_B CGL_4_B.cpp -g -Wall -DLOCAL_LOGGER -fsanitize=undefined

Run:
	./CGL_4_B < CGL_4_B.in > CGL_4_B.out
==================
}}} */