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<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<ld, ld> LDP;
typedef complex<ld> Point;
const ll mod = 1000000007;
const ld INF = 1e+30;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)

bool eq(ld a, ld b) {
	return abs(a - b) < eps;
}
bool eq(Point a, Point b) {
	return abs(a - b) < eps;
}
//内積
ld dot(Point a, Point b) {
	return real(conj(a)*b);
}
//外積
ld cross(Point a, Point b) {
	return imag(conj(a)*b);
}
//線分
//直線にするなら十分通い２点を端点とすればよい
class Line {
public:
	Point a, b;
};
//3点の位置関係
int ccw(Point a, Point b, Point c) {
	b -= a; c -= a;
	if (cross(b, c) > eps)return 1;//a,b,cが反時計回り
	if (cross(b, c) < -eps)return -1;//a,b,cが時計回り
	if (dot(b, c) < 0)return 2;//c,a,bの順に一直線
	if (norm(b) < norm(c))return -2;//a,b,cの順に一直線
	return 0;//a,c,bの順に一直線
}
bool isis_ls(Line l, Line s) {
	return (cross(l.b - l.a, s.a - l.a)*cross(l.b - l.a, s.b - l.a) < eps);
}
Point is_ll(Line s, Line t) {
	Point sv = s.b - s.a; Point tv = t.b - t.a;
	return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv);
}
Line mid_line(Point a, Point b) {
	ld mx = (real(a) + real(b)) / 2.0, my = (imag(a) + imag(b)) / 2.0;
	ld dx = real(b) - real(a), dy = imag(b) - imag(a);
	swap(dx, dy); dx = -dx;
	Point le = { mx + dx,my + dy }, ri = { mx - dx,my - dy };
	return { le,ri };
}
ld area(Point a, Point b, Point c) {
	ld x1 = real(b) - real(a), y1 = imag(b) - imag(a);
	ld x2 = real(c) - real(a), y2 = imag(c) - imag(a);
	return abs(x1*y2 - y1 * x2) / 2.0;
}
void merge(vector<Point> &v, Line l, Point c) {
	vector<Point> p; vector<int>id;
	rep(i, v.size()) {
		Point le = v[i], ri = v[(i + 1) % ((int)v.size())];
		Line s = { le,ri };
		if (isis_ls(l, s)) {
			Point nex = is_ll(l, s);
			bool f = true;
			rep(j, p.size()) {
				if (eq(p[j], nex))f = false;
			}
			if (f) {
				p.push_back(nex); id.push_back(i);
			}
		}
	}
	if (p.size() != 2)return;
	if (ccw(p[0], p[1], c) == -1) {
		swap(p[0], p[1]); swap(id[0], id[1]);
	}
	vector<Point> cop;
	cop.push_back(v[id[0]]);
	if (!eq(v[id[0]], p[0]))cop.push_back(p[0]);
	id[1] = (id[1] + 1) % (int)v.size();
	if (!eq(v[id[1]], p[1]))cop.push_back(p[1]);
	int cur = id[1];
	while (cur != id[0]) {
		cop.push_back(v[cur]);
		cur = (cur + 1) % (int)v.size();
	}
	v = cop;
}
ld calc_area(vector<Point> &v, Point c) {
	ld ret = 0;
	rep(i, v.size()) {
		Point le = v[i], ri = v[(i + 1) % (int)v.size()];
		ret += area(le, ri, c);
	}
	return ret;
}
void solve() {
	cout << fixed << setprecision(6);
	int n, m;
	while (cin >> n >> m, n) {
		vector<Point> v;
		rep(i, n) {
			ld x, y; cin >> x >> y;
			v.push_back({ x,y });
		}
		vector<Point> c(m);
		rep(i, m) {
			ld x, y; cin >> x >> y;
			c[i] = { x,y };
		}
		rep(i, m) {
			vector<Point> u = v;
			rep(j, m) {
				if (i == j)continue;
				Line l = mid_line(c[i], c[j]);
				merge(u, l, c[i]);
				/*cout << j << " hello" << endl;
				rep(j, u.size()) {
					cout << u[j] << endl;
				}*/
			}
			cout << calc_area(u,c[i]) << endl;
		}
	}
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	solve();
	//stop
	return 0;
}