#include<bits/stdc++.h>
using namespace std;

using ld=double;
using P=complex<ld>;
using Point=P;
const ld EPS=1e-9;
struct Line{
    P a,b;
};
ld cross(P x,P y){
    return real(x)*imag(y)-real(y)*imag(x);
}
Line halfLine(P x,P y){
    return Line{(x+y)/P(2,0),(x-y)*P(0,1)+(x+y)/P(2,0)};
}

bool isis_sp(Line x,P p){
    return abs(x.a-p)+abs(x.b-p)-abs(x.a-x.b)<EPS;
}
Point is_ll(Line s,Line t){
    P sv = s.b - s.a, tv = t.b - t.a;
    return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv);
}
bool isis_ll(Line x,Line y){
    return abs(cross(x.a-x.b,y.a-y.b))>EPS;
}
// P is_ll(Line x,Line y){
//     return x.a+(x.b-x.a)*cross(x.a-y.a,y.b-y.a)/cross(x.b-x.a,y.b-y.a);
// }
bool is_in_Polygon(P p,const vector<P> &poly){
    ld angle=0;
    int n=poly.size();
    for(int i=0;i<n;i++){
        P a=poly[i],b=poly[(i+1)%n];
        if(isis_sp(Line{a,b},p)) return true;
        angle+=arg((b-p)/(a-p));
    }
    if(abs(angle)<EPS) return false;
    return true;
}

ld area_of_Polygon(vector<P> p){
    ld res=0;
    for(int i=0;i<p.size();i++){
        ld xlen=real(p[(i+1)%p.size()]-real(p[i]));
        ld ylen=imag(p[(i+1)%p.size()])+imag(p[i]);
        res+=xlen*ylen/2;
    }
    return abs(res);
}
int solve(){
    int n,m;
    cin>>n>>m;
    if(n==0 && m==0) return false;
    vector<P> land(n);
    for(int i=0;i<n;i++){
        ld x,y;
        cin>>x>>y;
        land[i]={x,y};
    }
    vector<P> castle(m);
    for(int i=0;i<m;i++){
        ld x,y;
        cin>>x>>y;
        castle[i]={x,y};
    }

    auto isValid=[&](int idx,P p){
        if(!is_in_Polygon(p,land)) return false;
        vector<ld> dist(m);
        for(int i=0;i<m;i++) dist[i]=abs(castle[i]-p);
        ld mind=*min_element(dist.begin(),dist.end());
        return abs(mind-dist[idx])<EPS;
    };
    auto solve=[&](int idx){
        vector<Line> line;
        for(int i=0;i<m;i++){
            if(i!=idx){
                line.push_back(halfLine(castle[i],castle[idx]));
            }
        }
        for(int i=0;i<n;i++){
            line.push_back(Line{land[i],land[(i+1)%n]});
        }
        vector<P> poly;
        int s=line.size();
        for(int i=0;i<s;i++){
            for(int j=i+1;j<s;j++){
                if(isis_ll(line[i],line[j])){
                    P p=is_ll(line[i],line[j]);
                    if(isValid(idx,p)){
                        poly.push_back(p); 
                    }
                }
            }
        }
        sort(poly.begin(),poly.end(),[&](P x,P y){return arg(x-castle[idx])<arg(y-castle[idx]);});
        return area_of_Polygon(poly);
    };
    cout<<fixed<<setprecision(10);
    for(int i=0;i<m;i++){
        cout<<solve(i)<<endl;
    }
    return true;
}
int main(){
    while(solve());
}
