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<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 10;
const int MAX_M = 10;

/* typedef */

template <typename T>
struct Pt {
  T x, y;

  Pt() {}
  Pt(T _x, T _y) : x(_x), y(_y) {}
  Pt(const Pt& pt) : x(pt.x), y(pt.y) {}

  bool operator==(const Pt pt) const { return x == pt.x && y == pt.y; }
  Pt<T> operator+(const Pt pt) const { return Pt<T>(x + pt.x, y + pt.y); }
  Pt<T> operator-() const { return Pt<T>(-x, -y); }
  Pt<T> operator-(const Pt pt) const { return Pt<T>(x - pt.x, y - pt.y); }
  Pt<T> operator*(T t) const { return Pt<T>(x * t, y * t); }
  Pt<T> operator/(T t) const { return Pt<T>(x / t, y / t); }
  T dot(Pt v) const { return x * v.x + y * v.y; }
  T cross(Pt v) const { return x * v.y - y * v.x; }
  Pt<T> mid(const Pt pt) { return Pt<T>((x + pt.x) / 2, (y + pt.y) / 2); }
  T d2() { return x * x + y * y; }
  double d() { return sqrt(d2()); }

  Pt<T> rot(double th) {
    double c = cos(th), s = sin(th);
    return Pt<T>(c * x - s * y, s * x + c * y);
  }

  Pt<T> rot90() { return Pt<T>(-y, x); }

  bool operator<(const Pt& pt) const {
    return x < pt.x || (x == pt.x && y < pt.y);
  }

  void print(string format) {
    printf(("(" + format + ", " + format + ")\n").c_str(), x, y);
  }
  void print() { print("%.6lf"); }
};

typedef Pt<double> pt;
typedef vector<pt> vpt;

struct CL {
  pt p;
  double t0, t1;
  CL() {}
  CL(const pt& _p, double _t0, double _t1) : p(_p), t0(_t0), t1(_t1) {}
};

/* global variables */

int n, m;
pt pts[MAX_N], cpts[MAX_M];

/* subroutines */

bool cross_lines(const pt& a0, const pt& a1, const pt& b0, const pt& b1,
                 CL& cl) {
  pt da = a1 - a0;
  pt db = b1 - b0;

  double op01 = da.cross(db);
  if (op01 == 0.0) return false; /* need to handle parallel?? */

  pt v = b0 - a0;
  double op0 = v.cross(da);
  double op1 = v.cross(db);

  double t0 = op1 / op01;
  double t1 = op0 / op01;

  cl.p = db * t1 + b0;
  cl.t0 = t0;
  cl.t1 = t1;
  return true;
}

void convex_cut(const vpt& scpol, vpt& dcpol, const pt& pt0, const pt& pt1) {
  int n = scpol.size();
  pt v = pt1 - pt0;
  dcpol.clear();

  for (int i = 0; i < n; i++) {
    pt cpt0 = scpol[i];
    double cr0 = v.cross(cpt0 - pt0);
    if (cr0 >= 0.0) dcpol.push_back(cpt0);
    
    pt cpt1 = scpol[(i + 1) % n];
    double cr1 = v.cross(cpt1 - pt0);
    if (cr0 * cr1 < 0.0) {
      CL cl;
      cross_lines(pt0, pt1, cpt0, cpt1, cl);
      dcpol.push_back(cl.p);
    }
  }
}

double convex_area(vpt& cpol) {
  int n = cpol.size();
  if (n < 3) return 0.0;

  pt& p0 = cpol[0], v0 = cpol[1] - p0;
  double ar = 0.0;
  
  for (int i = 2; i < n; i++) {
    pt v1 = cpol[i] - p0;
    ar += v0.cross(v1);
    v0 = v1;
  }

  return ar / 2;
}

/* main */

int main() {
  for (;;) {
    cin >> n >> m;
    if (n == 0) break;
    
    for (int i = 0; i < n; i++) cin >> pts[i].x >> pts[i].y;
    for (int i = 0; i < m; i++) cin >> cpts[i].x >> cpts[i].y;

    for (int i = 0; i < m; i++) {
      vpt cpol0(pts, pts + n), cpol1;
      pt& cpti = cpts[i];

      for (int j = 0; j < m; j++)
	if (i != j) {
	  pt p0 = (cpti + cpts[j]) / 2;
	  pt v0 = (cpts[j] - cpti).rot90();

	  convex_cut(cpol0, cpol1, p0, p0 + v0);
	  cpol0 = cpol1;
	}

      double ar = convex_area(cpol0);
      printf("%.6lf\n", ar);
    }
  }

  return 0;
}