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 <bits/stdc++.h>
using namespace std;

using CP = complex<long double>;
#define X real()
#define Y imag()
const long double PI = acos(-1.0L);
const long double EPS = 1e-10;
// conj(x) : complex conjugate,(0,1)->(0,-1)
// abs(x) : dist between(0,0) and x
// norm(x) : abs(x) * abs(x)
// arg(x) : argment,[-PI,PI]

// dot(a,b) = |a||b|cos x
long double dot(CP a, CP b) { return (conj(a) * b).X; }
// cross(a,b) : area of parallelogram
// sign : right screw ? + : -
long double cross(CP a, CP b) { return (conj(a) * b).Y; }
long double corner(CP a, CP b) {
  //[0,PI]
  return acos(dot(a, b) / (abs(a) * abs(b)));
}

CP projection(CP p, CP s, CP t) {
  CP base = t - s;
  long double r = dot(p - s, base) / norm(base);
  return s + base * r;
}

CP reflection(CP p, CP s, CP t) {
  CP tmp = (projection(p, s, t) - p);
  tmp *= 2;
  return p + tmp;
}

CP intersectionLL(CP a, CP b, CP c, CP d) {
  return a + (b - a) * (cross(d - c, c - a) /
                        cross(d - c, b - a));
}

bool on_seg(CP a, CP b, CP p) {
  // if not use end point, dot(a - p, b - p) < 0
  return abs(cross(a - p, b - p)) <= 1e-10 &&
         dot(a - p, b - p) <= 0;
}

// crossing lines? (a,b) and (c,d)
bool iscross(CP a, CP b, CP c, CP d) {
  // parallel
  if(abs(cross(a - b, c - d)) <= 1e-10) {
    return on_seg(a, b, c) || on_seg(a, b, d) ||
           on_seg(c, d, a) || on_seg(c, d, b);
  }
  CP isp = intersectionLL(a, b, c, d);
  return on_seg(a, b, isp) && on_seg(c, d, isp);
}

long double distLP(CP a, CP b, CP p) {
  return abs(cross(b - a, p - a) / abs(b - a));
}

// segmentver.
long double distSP(CP a, CP b, CP p) {
  if(dot(b - a, p - a) < 0) return abs(p - a);
  if(dot(a - b, p - b) < 0) return abs(p - b);
  return distLP(a, b, p);
}

// segment and segment
long double distSS(CP a, CP b, CP c, CP d) {
  long double res = 1e18;
  if(iscross(a, b, c, d)) return 0.0L;
  res = min(res, distSP(a, b, c));
  res = min(res, distSP(a, b, d));
  res = min(res, distSP(c, d, a));
  res = min(res, distSP(c, d, b));
  return res;
}

vector<CP> Convex_Hull(vector<CP> &ps) {
  auto lmd = [&](const CP &l, const CP &r) {
    if(l.X != r.X) return l.X < r.X;
    return l.Y < r.Y;
  };
  vector<CP> qs;
  int psize = ps.size();
  sort(ps.begin(), ps.end(), lmd);
  int k = 0;
  qs.resize(psize * 2);
  for(int i = 0; i < psize; ++i) {
    while(k > 1 && cross(qs[k - 1] - qs[k - 2],
                         ps[i] - qs[k - 1]) <= 0)
      --k;
    qs[k++] = ps[i];
  }
  for(int i = psize - 2, t = k; i >= 0; --i) {
    while(k > t && cross(qs[k - 1] - qs[k - 2],
                         ps[i] - qs[k - 1]) <= 0)
      --k;
    qs[k++] = ps[i];
  }
  qs.resize(k - 1);
  return qs;
}

long double CH_Diameter(vector<CP> &newv) {
  vector<CP> v = Convex_Hull(newv);
  int n = v.size(), i = 0, j = 0;
  if(n == 2) return abs(v[0] - v[1]);
  for(int k = 0; k < n; ++k) {
    if(v[k].X < v[i].X) i = k;
    if(v[k].X > v[j].X) j = k;
  }
  long double res = 0;
  int si = i, sj = j;
  while(i != sj || j != si) {
    res = max(res, abs(v[i] - v[j]));
    if(cross(v[(i + 1) % n] - v[i], v[(j + 1) % n] - v[j]) <
       0)
      (++i) %= n;
    else
      (++j) %= n;
  }
  return res;
}

struct Circle {
  CP o;
  long double r;
  Circle(long double _x = 0.0L, long double _y = 0.0L,
         long double _r = 0.0L)
      : o(CP(_x, _y)), r(_r) {}
};

void intersectionCL(Circle ci, CP s, CP t, CP &res1,
                    CP &res2) {
  res1 = res2 = projection(ci.o, s, t);
  long double r = sqrtl(ci.r * ci.r - norm(res1 - ci.o));
  t -= s;
  t *= r / abs(t);
  res1 += t;
  res2 -= t;
  if(res1.X > res2.X ||
     (res1.X == res2.X && res1.Y > res2.Y))
    swap(res1, res2);
}

long double PolygonArea(vector<CP> &v) {
  int n = v.size();
  long double res = 0;
  for(int i = 0; i < n; ++i)
    res +=
        (v[(i - 1 + n) % n].X - v[(i + 1) % n].X) * v[i].Y;
  return res / 2.0L;
}

long long n, q;
vector<CP> v;

int main() {
  cout << fixed << setprecision(10);
  cin >> n;
  for(int i = 0; i < n; ++i) {
    long double a, b;
    cin >> a >> b;
    v.emplace_back(a, b);
  }
  cout << CH_Diameter(v) << endl;

  return 0;
}