Problem: Mike Smith is a man exploring caves all over the world.

One day, he faced a scaring creature blocking his way. He got scared, but in short time he took his knife and then slashed it to attempt to kill it. Then they were split into parts, which soon died out but the largest one. He slashed the creature a couple of times more to make it small enough, and finally became able to go forward.

Now let us think of his situation in a mathematical way. The creature is considered to be a polygon, convex or concave. Mike slashes this creature straight with his knife in some direction. We suppose here the direction is given for simpler settings, while the position is arbitrary. Then all split parts but the largest one disappears.

Your task is to write a program that calculates the area of the remaining part when the creature is slashed in such a way that the area is minimized.



Input

The input is a sequence of datasets. Each dataset is given in the following format:

n
vx vy
x1 y1
...
xn yn

The first line contains an integer n, the number of vertices of the polygon that represents the shape of the creature (3 ≤ n ≤ 100). The next line contains two integers vx and vy, where (vx, vy) denote a vector that represents the direction of the knife (-10000 ≤ vx, vy ≤ 10000, vx2 + vy2 > 0). Then n lines follow. The i-th line contains two integers xi and yi, where (xi, yi) denote the coordinates of the i-th vertex of the polygon (0 ≤ xi, yi ≤ 10000).

The vertices are given in the counterclockwise order. You may assume the polygon is always simple, that is, the edges do not touch or cross each other except for end points.

The input is terminated by a line with a zero. This should not be processed.

Output

For each dataset, print the minimum possible area in a line. The area may be printed with an arbitrary number of digits after the decimal point, but should not contain an absolute error greater than 10-2.

Example

Input

5
0 1
0 0
5 0
1 1
5 2
0 2
7
9999 9998
0 0
2 0
3 1
1 1
10000 9999
2 2
0 2
0


Output

2.00
2.2500000

Solution (in CPP):

Solution:
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<math.h>
using namespace std;
const long double EPS = 1e-15;
const long double INF = 1e+10;
const long double PI = acos(-1);
int sig(long double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; }
inline long double ABS(long double a){return max(a,-a);}
struct Pt {
	long double x, y;
	Pt() {}
	Pt(long double x, long double y) : x(x), y(y) {}
	Pt operator+(const Pt &a) const { return Pt(x + a.x, y + a.y); }
	Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); }
	Pt operator*(const Pt &a) const { return Pt(x * a.x - y * a.y, x * a.y + y * a.x); }
	Pt operator-() const { return Pt(-x, -y); }
	Pt operator*(const long double &k) const { return Pt(x * k, y * k); }
	Pt operator/(const long double &k) const { return Pt(x / k, y / k); }
	long double ABS() const { return sqrt(x * x + y * y); }
	long double abs2() const { return x * x + y * y; }
	long double arg() const { return atan2(y, x); }
	long double dot(const Pt &a) const { return x * a.x + y * a.y; }
	long double det(const Pt &a) const { return x * a.y - y * a.x; }
};
long double tri(const Pt &a, const Pt &b, const Pt &c) { return (b - a).det(c - a); }
int iSP(Pt a, Pt b, Pt c) {
	int s = sig((b - a).det(c - a));
	if (s) return s;
	if (sig((b - a).dot(c - a)) < 0) return -2; // c-a-b
	if (sig((a - b).dot(c - b)) < 0) return +2; // a-b-c
	return 0;
}
int iLL(Pt a, Pt b, Pt c, Pt d) {
	if (sig((b - a).det(d - c))) return 1; // intersect
	if (sig((b - a).det(c - a))) return 0; // parallel
	return -1; // correspond
}
bool iLS(Pt a, Pt b, Pt c, Pt d) {
	return (sig(tri(a, b, c)) * sig(tri(a, b, d)) <= 0);
}
bool iSS(Pt a, Pt b, Pt c, Pt d) {
	return (iSP(a, b, c) * iSP(a, b, d) <= 0 && iSP(c, d, a) * iSP(c, d, b) <= 0);
}
bool iSSstrict(Pt a, Pt b, Pt c, Pt d) {
	return (sig(tri(a, b, c)) * sig(tri(a, b, d)) < 0 && sig(tri(c, d, a)) * sig(tri(c, d, b)) < 0);
}
Pt pLL(Pt a, Pt b, Pt c, Pt d) {
	b = b - a; d = d - c; return a + b * (c - a).det(d) / b.det(d);
}


Pt p[110];
Pt v;
int n;
long double z[110];
pair<long double,int>ev[110];
int vis[110];
int to[110];
long double tx[110];
long double fx[110];

long double calc2(long double y,int d){
	long double ret=0;
	int now=0;
	int sz=0;
	for(int i=0;i<n;i++){
		if(iLS(Pt(0,y),Pt(1,y),p[i],p[i+1])){
			ev[sz++]=make_pair(pLL(Pt(0,y),Pt(1,y),p[i],p[i+1]).x,i);
		}
	}
	for(int i=0;i<n;i++)to[i]=-1;
	std::sort(ev,ev+sz);
	//printf("%d\n",sz);
	for(int i=0;i<sz;i++){
		to[ev[i].second]=ev[i^1].second;
		tx[ev[i].second]=ev[i^1].first;
		fx[ev[i].second]=ev[i].first;
	}
	for(int i=0;i<n;i++)vis[i]=0;
	for(int i=0;i<n;i++){
		if(vis[i])continue;
		if(d==0&&p[i].y>y)continue;
		if(d==1&&p[i].y<y)continue;
		long double val=0;
		int at=i;
		Pt pos=p[i];
		bool fl=true;
		while(1){
			if(fl)vis[at]=1;
			if(fl&&~to[at]){
				fl=false;
				val+=pos.det(Pt(fx[at],y));
				val+=(Pt(fx[at],y)).det(Pt(Pt(tx[at],y)));
				pos=Pt(tx[at],y);
				at=to[at];
			}else{
				fl=true;
				val+=pos.det(p[at+1]);
				at=(at+1)%n;
				pos=p[at];
			}
			if(fl&&vis[at])break;
		}
		if(val<0)val=-val;
//		if(val<0)printf("%Lf\n",val);
		ret=max(ret,val/2);
	}
	//if(ret<1)printf("%Lf %d: %Lf\n",y,d,ret);
	return ret;
}
long double calc(long double y){
	return max(calc2(y-EPS*10000,0),calc2(y+EPS*10000,1));
}
int main(){
	int a;
	while(scanf("%d",&a),a){
		n=a;
		for(int i=0;i<110;i++)p[i]=Pt(0,0);
		v=Pt(0,0);
		long double X,Y;
		scanf("%Lf%Lf",&X,&Y);
		v=Pt(X,Y);
		long double th=v.arg();
		for(int i=0;i<a;i++){
			scanf("%Lf%Lf",&X,&Y);
			p[i]=Pt(X,Y);
			p[i]=p[i]*Pt(cos(th),-sin(th));
			z[i]=p[i].y;
		//	printf("%Lf %Lf\n",p[i].x,p[i].y);
		}
		
		p[a]=p[0];
		std::sort(z,z+a);
		long double ret=999999999;
		for(int i=0;i<a;i++){
			if(i==0||sig(z[i]-z[i-1])==0)continue;
			ret=min(ret,calc(z[i]));

			long double left=z[i-1];
			long double right=z[i];
			for(int j=0;j<100;j++){
				long double M1=calc((left*2+right)/3);
				long double M2=calc((left+right*2)/3);
				ret=min(ret,min(M1,M2));
				if(M1>M2)left=(left*2+right)/3;
				else right=(right*2+left)/3;
			}
		}
		printf("%.12Lf\n",ret);
	}
}