#include <bits/stdc++.h>
using namespace std;
class Line {
 public:
  double a, b, c;
  Line(const double _a = 0.0, const double _b = 0.0, const double _c = 0.0)
      : a(_a), b(_b), c(_c) {}
  Line(const pair<double, double> &p1, const pair<double, double> &p2)
      : a(p1.second - p2.second),
        b(p2.first - p1.first),
        c(p1.first * p2.second - p1.second * p2.first) {}
};
vector<Line> Plane;
vector<pair<double, double> > Points;
vector<double> Areas;
inline double Det(const pair<double, double> &a, const pair<double, double> &b,
                  const pair<double, double> &c) {
  return (b.first - a.first) * (c.second - a.second) -
         (b.second - a.second) * (c.first - a.first);
}
class Compare {
 public:
  static pair<double, double> origin;
  bool operator()(const pair<double, double> &a,
                  const pair<double, double> &b) const {
    return Det(origin, a, b) >= 0;
  }
};
pair<double, double> Compare::origin;
vector<pair<double, double> > ConvexHull(vector<pair<double, double> > points) {
  int n = int(points.size());
  int origin = 0;
  for (int i = 1; i < n; ++i)
    if (points[i] < points[origin]) origin = i;
  swap(points[0], points[origin]);
  Compare::origin = points[0];
  sort(points.begin() + 1, points.end(), Compare());
  points.push_back(points[0]);
  vector<pair<double, double> > hull;
  for (int i = 0; i < int(points.size()); ++i) {
    while (int(hull.size()) > 1 &&
           Det(hull[int(hull.size()) - 2], hull[int(hull.size()) - 1],
               points[i]) <= 0)
      hull.pop_back();
    hull.push_back(points[i]);
  }
  hull.pop_back();
  return hull;
}
inline pair<double, double> Dualize(const Line &l) {
  if (l.c == 0)
    return pair<double, double>(0, 0);
  else
    return pair<double, double>(l.a / l.c, l.b / l.c);
}
inline Line Dualize(const pair<double, double> &p) {
  return Line(p.first, p.second, 1);
}
inline pair<double, double> Translate(const pair<double, double> &p,
                                      const pair<double, double> &shift) {
  return pair<double, double>(p.first + shift.first, p.second + shift.second);
}
inline Line Translate(const Line &l, const pair<double, double> &shift) {
  return Line(l.a, l.b, l.c - l.a * shift.first - l.b * shift.second);
}
vector<vector<pair<double, double> > > GetVoronoiDiagrams(
    const vector<Line> &plane, const vector<pair<double, double> > &points) {
  int n = int(points.size());
  vector<vector<pair<double, double> > > voronoiDiagrams =
      vector<vector<pair<double, double> > >(n,
                                             vector<pair<double, double> >());
  for (int i = 0; i < n; ++i) {
    pair<double, double> shift =
        pair<double, double>(-points[i].first, -points[i].second);
    vector<pair<double, double> > dualizedLines;
    for (int j = 0; j < int(plane.size()); ++j)
      dualizedLines.push_back(Dualize(Translate(plane[j], shift)));
    for (int j = 0; j < n; ++j) {
      if (i != j) {
        pair<double, double> a = points[i], b = points[j];
        dualizedLines.push_back(Dualize(
            Translate(Line(2 * (b.first - a.first), 2 * (b.second - a.second),
                           a.first * a.first + a.second * a.second -
                               b.first * b.first - b.second * b.second),
                      shift)));
      }
    }
    vector<pair<double, double> > hull = ConvexHull(dualizedLines);
    for (int j = 0; j < int(hull.size()); ++j)
      voronoiDiagrams[i].push_back(Translate(
          Dualize(Line(hull[j], hull[(j + 1) % int(hull.size())])), points[i]));
  }
  return voronoiDiagrams;
}
inline double GetArea(const vector<pair<double, double> > &polygon) {
  int n = int(polygon.size());
  double area = 0.0;
  for (int i = 0; i < n; ++i)
    area += polygon[i].first * polygon[(i + 1) % n].second -
            polygon[(i + 1) % n].first * polygon[i].second;
  area /= 2.0;
  if (area < 0.0) area = -area;
  return area;
}
void Solve() {
  vector<vector<pair<double, double> > > voronoi =
      GetVoronoiDiagrams(Plane, Points);
  Areas = vector<double>(int(Points.size()), 0.0);
  for (int i = 0; i < int(Points.size()); ++i) Areas[i] = GetArea(voronoi[i]);
}
bool Read() {
  int n, m;
  cin >> n >> m;
  if (n == 0 && m == 0) return false;
  vector<pair<double, double> > planePolygon = vector<pair<double, double> >(n);
  for (int i = 0; i < n; ++i)
    cin >> planePolygon[i].first >> planePolygon[i].second;
  Plane = vector<Line>(n);
  for (int i = 0; i < n; ++i)
    Plane[i] = Line(planePolygon[i], planePolygon[(i + 1) % n]);
  Points = vector<pair<double, double> >(m);
  for (int i = 0; i < m; ++i) cin >> Points[i].first >> Points[i].second;
  return true;
}
void Print() {
  for (int i = 0; i < int(Points.size()); ++i) printf("%.7lf\n", Areas[i]);
}
int main() {
  while (Read()) {
    Solve();
    Print();
  }
  return 0;
}
