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 <algorithm>
#include <iostream>
#include <vector>
#include <iostream>
#include <cstdio>
#include <complex>
#include <utility>
#define X real()
#define Y imag()
#define EPS (1e-10)
using namespace std;
typedef complex<double> P;
typedef pair<P,P> L;
typedef vector<P> Poly;
namespace std{
  bool operator<(const P& a, const P& b){
    return a.X != b.X ? a.X < b.X : a.Y < b.Y;
  }
}

double cross(P a, P b){
  return a.X*b.Y - a.Y*b.X;
}

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

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

int main(){
  int n;
  cin >> n;
  Poly p;
  double x, y;
  for(int i = 0; i < n; ++i){
    cin >> x >> y;
    p.push_back(P(x,y));
  }
  printf("%.10lf\n", caliper(p));
  return 0;
}