Problem: Mr. KM, the mayor of KM city, decided to build a new elementary school. The site for the school has an awkward polygonal shape, which caused several problems. The most serious problem was that there was not enough space for a short distance racetrack. Your task is to help Mr. KM to calculate the maximum possible length for the racetrack that can be built in the site. The track can be considered as a straight line segment whose width can be ignored. The boundary of the site has a simple polygonal shape without self-intersection, and the track can touch the boundary. Note that the boundary might not be convex.



Input

The input consists of multiple test cases, followed by a line containing "0". Each test case has the following format. The first line contains an integer N (3 \leq N \leq 100). Each of the following N lines contains two integers x_i and y_i (-1,000 \leq x_i, y_i \leq 1,000), which describe the coordinates of a vertex of the polygonal border of the site, in counterclockwise order.

Output

For each test case, print its case number and the maximum possible length of the track in a line. The answer should be given as a floating point number with an absolute error of at most 10^{-6}.

Example

Input

4
0 0
10 0
10 10
0 10
3
0 0
1 0
0 1
0


Output

Case 1: 14.142135624
Case 2: 1.41421356

Solution (in CPP):

Solution:
#include<iostream>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<ctime>
#include<algorithm>
#include<list>
#include<queue>
#include<stack>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<string>
#define sgn(v) (abs((v))<eps?0:((v)<0?-1:1))
#define sqr(v) ((v)*(v))
#define mb make_pair
#define debug 0
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int,int> PII;
typedef pair<int,LL> PIL;
typedef pair<LL,int> PLI;
typedef pair<LL,LL> PLL;
const double eps=1e-8;
const double pi=acos(-1);
const int maxn=101;
struct Point
{
	double x,y;
	Point(){}
	Point(double X,double Y)
	{
		x=X;y=Y;
	}
	bool operator <(const Point &p)const
	{
		if(sgn(x-p.x))return x<p.x;
		else return y<p.y;
	}
	bool operator ==(const Point &p)const
	{
		return sgn(x-p.x)==0&&sgn(y-p.y)==0;
	}
	Point operator -(const Point &p)
	{
		return Point(x-p.x,y-p.y);
	}
	Point operator +(const Point &p)
	{
		return Point(x+p.x,y+p.y);
	}
	double cross(const Point &p)const
	{
		return x*p.y-y*p.x;
	}
	double len()
	{
		return sqrt(sqr(x)+sqr(y));
	}
	void unit()
	{
		double tmp=len();
		x/=tmp;
		y/=tmp;
		x*=0.0001;
		y*=0.0001;
	}
}pt[maxn];
struct Segment
{
	Point st,ed;
};
double cross(const Point &p,const Point &q)
{
	return p.x*q.y-p.y*q.x;
}
double dot(const Point &p,const Point &q)
{
	return p.x*q.x+p.y*q.y;
}
Point Insect(Segment &p,Segment &q)
{
	double u=cross(p.ed-p.st,q.st-p.st),v=cross(p.st-p.ed,q.ed-p.st);
	return Point((q.st.x*v+q.ed.x*u)/(u+v),(q.st.y*v+q.ed.y*u)/(u+v));
}
vector<Point> tp,sp;
int n,cas;
int check(Point P,int deb)
{
	int con=0;
	Segment now,tmp;
	Point cp;
	now.st=P;
	con=0;
	now.ed.x=P.x+19950527;
	now.ed.y=P.y+27051995;
	for(int i=0;i<n;++i)
	{
		tmp.st=pt[i];
		tmp.ed=pt[(i+1)%n];
		if(sgn((tmp.ed-tmp.st).cross(now.ed-now.st)))
		{
			cp=Insect(tmp,now);
			if(cp==tmp.ed||cp==tmp.st)while(1);
			if(sgn(dot(tmp.ed-cp,cp-tmp.st))>0&&sgn(dot(now.ed-cp,cp-now.st))>0)
				++con;
		}
	}
	return con%2;
}
	
double check(int i,int j)
{
	Segment now,tmp;
	Point cp;
	tp.clear();
	now.st=pt[i];
	now.ed=pt[j];
	for(i=0;i<n;++i)
	{
		tmp.st=pt[i];
		tmp.ed=pt[(i+1)%n];
		if(sgn((tmp.ed-tmp.st).cross(now.ed-now.st)))
		{
			cp=Insect(tmp,now);
			if(sgn(dot(tmp.ed-cp,cp-tmp.st))>0)
				tp.push_back(cp);
			else if(sgn(dot(tmp.ed-cp,cp-tmp.st))==0) // endpoints
			{
				if(cp==tmp.st)j=i;
				else j=i+1;
				if(cross(pt[(j-1+n)%n]-now.st,now.ed-now.st)*cross(pt[(j+1)%n]-now.st,now.ed-now.st)<0)
					tp.push_back(cp);
			}
		}
		else if(sgn((tmp.st-now.st).cross(now.ed-now.st))==0&&sgn((tmp.ed-now.st).cross(now.ed-now.st))==0)
		{
			Point vec=tmp.ed-tmp.st;
			vec.unit();
			if(cross(pt[(i-1+n)%n]-now.st,now.ed-now.st)*cross(pt[(i+2)%n]-now.st,now.ed-now.st)<0)
			{
				if(!check(tmp.st-vec,0))
					tp.push_back(tmp.st);
				if(!check(tmp.ed+vec,0))
					tp.push_back(tmp.ed);
			}
		}
	}
	sort(tp.begin(),tp.end());
	int n=tp.size();
	sp.clear();
	for(i=0;i<n;++i)
		if(i==0||(!(tp[i]==tp[i-1])))sp.push_back(tp[i]);
	double ans=0;
	for(i=0;i<sp.size();i+=2)
		ans=max(ans,(sp[i+1]-sp[i]).len());
	return ans;
}
int main()
{
	int i,j;
	cas=0;
	while(scanf("%d",&n)!=EOF)
	{
		if(n==0)break;
		double len=0;
		for(i=0;i<n;++i)
			scanf("%lf%lf",&pt[i].x,&pt[i].y);
		for(i=0;i<n;++i)
			len=max(len,(pt[i]-pt[(i+1)%n]).len());
		for(i=0;i<n;++i)
			for(j=i+1;j<n;++j)
				len=max(len,check(i,j));
		printf("Case %d: %.10f\n",++cas,len);
		//cout <<len*len<<endl;
	}
	return 0;
}