Problem: Some of you know an old story of Voronoi Island. There were N liege lords and they are always involved in territorial disputes. The residents of the island were despaired of the disputes.

One day, a clever lord proposed to stop the disputes and divide the island fairly. His idea was to divide the island such that any piece of area belongs to the load of the nearest castle. The method is called Voronoi Division today.

Actually, there are many aspects of whether the method is fair. According to one historian, the clever lord suggested the method because he could gain broader area than other lords.

Your task is to write a program to calculate the size of the area each lord can gain. You may assume that Voronoi Island has a convex shape.



Input

The input consists of multiple datasets. Each dataset has the following format:

N M
Ix1 Iy1
Ix2 Iy2
...
IxN IyN
Cx1 Cy1
Cx2 Cy2
...
CxM CyM


N is the number of the vertices of Voronoi Island; M is the number of the liege lords; (Ixi, Iyi) denotes the coordinate of the i-th vertex; (Cxi, Cyi ) denotes the coordinate of the castle of the i-the lord.

The input meets the following constraints: 3 ≤ N ≤ 10, 2 ≤ M ≤ 10, -100 ≤ Ixi, Iyi, Cxi, Cyi ≤ 100. The vertices are given counterclockwise. All the coordinates are integers.

The last dataset is followed by a line containing two zeros. This line is not a part of any dataset and should not be processed.

Output

For each dataset, print the area gained by each liege lord with an absolute error of at most 10-4 . You may output any number of digits after the decimal point. The order of the output areas must match that of the lords in the input.

Example

Input

3 3
0 0
8 0
0 8
2 2
4 2
2 4
0 0


Output

9.0
11.5
11.5

Solution (in CPP):

Solution:
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
#define rep(i,n) for(int i=0;i<((int)(n));i++)
#define reg(i,a,b) for(int i=((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i=((int)(n))-1;i>=0;i--)
#define ireg(i,a,b) for(int i=((int)(b));i>=((int)(a));i--)
typedef long long int lli;
typedef pair<int,int> mp;
#define fir first
#define sec second


typedef double D;

const D pi=3.14159265358979;

struct P{
	D x,y,n,n2;
	D norm,norm2;
	P(){}
	P(D ix,D iy){
		x=ix; y=iy;
		n2=x*x+y*y;
		n=sqrt(n2);
	}
	P to(P a){
		return (a-(*this));
	}
	P operator+(P a)const{
		return P(x+a.x,y+a.y);
	}
	P operator-(P a)const{
		return P(x-a.x,y-a.y);
	}
	P scalar(D a){
		return P(x*a,y*a);
	}
	D dot(P a){
		return x*a.x + y*a.y;
	}
	D cross(P a){
		return x*a.y - y*a.x;
	}
	D theta(P a){
		D s = (cross(a)/(n*a.n))>0.0?1:-1;
		return acos(max(-1.0,min(1.0,dot(a)/(n*a.n))))*s;
	}
	static P polar(D r,D t){
		return P(r*cos(t),r*sin(t));
	}
	P turn(D t){
		return P(x*cos(t)-y*sin(t),x*sin(t)+y*cos(t));
	}
	P tolen(D a){
		return this->scalar(a/n);
	}
	bool  operator<(P a) const{
		if(y!=a.y)return (y<a.y);
		return (x<a.x);
	}	
	bool operator>(P a)const{ return (a<(*this)); }	
};

struct L{
	P p,q,v;
	L(){}
	L(P ip,P iq){
		p=ip; q=iq;
		v=p.to(q);
	}
	bool iscross(L a){
		D da,db;
		da=v.cross(p.to(a.p));
		db=v.cross(p.to(a.q));
		if(da*db>=0)return false;
		da=a.v.cross(a.p.to(p));
		db=a.v.cross(a.p.to(q));
		return (da*db<0);
	}

	D dist(P a){
		if(p.to(a).dot(p.to(q))<0)return p.to(a).n;
		if(q.to(a).dot(q.to(p))<0)return q.to(a).n;
		return abs(v.cross(p.to(a))/v.n);
	}
	D dist(L a){
		if(iscross(a))return 0;
		return min(min(dist(a.p),dist(a.q)) , min(a.dist(this->p),a.dist(this->q)));
	}
	P crosspos(L a){
		return (p+v.scalar(a.v.cross(a.p-p)/a.v.cross(v)));
	}
	L bisection(){//垂直二等分線
		//半時計回りに90度回った向きの。
		P fr=(p+q).scalar(0.5);
		P to=fr+P(-v.y,v.x);
		return L(fr,to);
	}
};


struct Pol{
	vector<P> ps;
	Pol(){}
	D area(){
		D res=0;
		rep(i,ps.size()){
			P no=ps[i],to=ps[(i+1)%ps.size()];
			res+=(no.x+to.x)*(no.y-to.y);
		}
		if(res<0)reverse(ps.begin(),ps.end());
		return abs(res)/2;
	}
	Pol(P a,P b){
		ps.push_back(a);
		ps.push_back(P(a.x,b.y));
		ps.push_back(b);
		ps.push_back(P(b.x,a.y));
	}
	L gete(int a){
		a%=ps.size();
		return L(ps[a],ps[(a+1)%ps.size()]);
	}
	int isin(P a){//内側なら2,乗ってるなら1,外なら0
		D as=0;
		rep(i,ps.size()){
			L ne=gete(i);
			if(ne.dist(a)<=0)return 1;
			P v1=a.to(ne.p);
			P v2=a.to(ne.q);
			as+=v1.theta(v2);
		}
		if(abs(as)<1e-6)return 0;
		return 2;
	}
	Pol cut(L a){//進行方向右手を残す
		Pol res;
		rep(i,ps.size()){
			L ne=gete(i);
			D d1=a.v.cross(a.p.to(ne.p));
			D d2=a.v.cross(a.p.to(ne.q));
			if(d1<1e-6)res.ps.push_back(ne.p); //こっちは正のeps
			if(d1*d2<-1e-6)res.ps.push_back(a.crosspos(ne)); //こっちは負のeps
		}
		return res;
	}
	
	vector<Pol> voronoi(vector<P> ps){
		//validate AOJ 2160
		vector<Pol> res;
		rep(i,ps.size()){
			Pol np(*this);
			rep(j,ps.size()){
				if(i==j)continue;
				L nl = L(ps[j],ps[i]).bisection();
				
				np = np.cut(nl);
			}
			res.push_back(np);
		}
		return res;		
	}
};

int main(){
	for(;;){
		int n,m;
		scanf("%d%d",&n,&m);
		if(n==0)break;
		Pol po;
		rep(i,n){
			double x,y;
			scanf("%lf%lf",&x,&y);
			po.ps.push_back(P(x,y));
		}
	
		vector<P> tps;
		rep(i,m){
			double x,y;
			scanf("%lf%lf",&x,&y);
			tps.push_back(P(x,y));
		}
		vector<Pol> anss = po.voronoi(tps);
	
		rep(i,anss.size()){
			printf("%lf\n",anss[i].area());
		}
	}
	return 0;
}