#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);
	}
}

Measured memory_bytes: 1188