#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[100000], queries[100000];
vector<pair<int, int> > L, R;
vector<int> Y;
pair<double, double> query(int second) {
  double a, b;
  int p =
      upper_bound(L.begin(), L.end(), make_pair(second, (int)1e9)) - L.begin();
  if (p == L.size())
    a = L.back().second;
  else
    a = ((double)L[p - 1].second * (L[p].first - second) +
         (double)L[p].second * (second - L[p - 1].first)) /
        (L[p].first - L[p - 1].first);
  p = upper_bound(R.begin(), R.end(), make_pair(second, (int)1e9)) - R.begin();
  if (p == R.size())
    b = R.back().second;
  else
    b = ((double)R[p - 1].second * (R[p].first - second) +
         (double)R[p].second * (second - R[p - 1].first)) /
        (R[p].first - R[p - 1].first);
  if (a > b) swap(a, b);
  return make_pair(a, b);
}
double query2(pair<double, double> &l, pair<double, double> &r, double first,
              double dy) {
  double s = 0, e = dy;
  if (abs(l.first - r.first) > 1e-9) {
    double m = dy / (r.first - l.first), b = -m * l.first,
           second = m * first + b;
    if (r.first > l.first)
      e = min(e, second);
    else
      s = max(s, second);
  }
  if (abs(l.second - r.second) > 1e-9) {
    double m = dy / (r.second - l.second), b = -m * l.second,
           second = m * first + b;
    if (r.second < l.second)
      e = min(e, second);
    else
      s = max(s, second);
  }
  double m1 = (l.first - r.first) / dy, b1 = first - l.first;
  double m2 = (r.second - l.second) / dy, b2 = l.second - first;
  double u1 = m1 * s + b1, v1 = m2 * s + b2;
  double u2 = m1 * e + b1, v2 = m2 * e + b2;
  if ((abs(u1 - v1) > 1e-9) && (abs(u2 - v2) > 1e-9) &&
      ((u1 > v1) != (u2 > v2))) {
    double first = (b2 - b1) / (m1 - m2), second = m1 * first + b1;
    return 0.5 * ((second + min(u1, v1)) * (first - s) +
                  (second + min(u2, v2)) * (e - first));
  } else
    return 0.5 * (min(u1, v1) + min(u2, v2)) * (e - s);
}
bool comp2(double a, double b) { return abs(a - b) < 1e-9; }
struct event {
  double first, a, b, c;
};
vector<event> events;
bool comp(event a, event b) { return a.first < b.first; }
double ans[100000];
int main() {
  int i;
  int n, q;
  scanf("%d %d", &n, &q);
  for (i = 0; i < n; i++)
    scanf("%d %d", &p[i].first, &p[i].second), Y.push_back(p[i].second);
  for (i = 0; i < q; i++) scanf("%d", &queries[i].first), queries[i].second = i;
  sort(queries, queries + q);
  int j, u = 0, v = 0;
  for (i = 0; i < n; i++) {
    if (p[i].second < p[u].second) u = i;
    if (p[i].second > p[v].second) v = i;
  }
  i = u, L.push_back(make_pair(p[i].second, p[i].first));
  while (i != v)
    i = (i + 1) % n, L.push_back(make_pair(p[i].second, p[i].first));
  i = u, R.push_back(make_pair(p[i].second, p[i].first));
  while (i != v)
    i = (i + n - 1) % n, R.push_back(make_pair(p[i].second, p[i].first));
  sort(Y.begin(), Y.end());
  Y.resize(unique(Y.begin(), Y.end()) - Y.begin());
  for (i = 1; i < Y.size(); i++) {
    pair<double, double> l = query(Y[i - 1]), r = query(Y[i]);
    vector<double> vv;
    vv.push_back(l.first), vv.push_back(l.second), vv.push_back(r.first),
        vv.push_back(r.second);
    vv.push_back((l.first + l.second) / 2),
        vv.push_back((r.first + r.second) / 2);
    sort(vv.begin(), vv.end());
    vv.resize(unique(vv.begin(), vv.end(), comp2) - vv.begin());
    double a = 0, b = 0, c = 0;
    for (j = 1; j < vv.size(); j++) {
      double ll = query2(l, r, vv[j - 1], Y[i] - Y[i - 1]);
      double mm = query2(l, r, (vv[j - 1] + vv[j]) / 2, Y[i] - Y[i - 1]);
      double rr = query2(l, r, vv[j], Y[i] - Y[i - 1]);
      double dx = vv[j] - vv[j - 1];
      double a2 = 2 * (ll - 2 * mm + rr) / (dx * dx);
      double b2 =
          (rr - a2 * vv[j] * vv[j] - ll + a2 * vv[j - 1] * vv[j - 1]) / dx;
      double c2 = rr - a2 * vv[j] * vv[j] - b2 * vv[j];
      events.push_back((event){vv[j - 1], a2 - a, b2 - b, c2 - c});
      a = a2, b = b2, c = c2;
    }
    events.push_back((event){vv.back(), -a, -b, -c});
  }
  j = 0;
  double a = 0, b = 0, c = 0;
  sort(events.begin(), events.end(), comp);
  for (i = 0; i < q; i++) {
    while ((j < events.size()) && (events[j].first < queries[i].first))
      a += events[j].a, b += events[j].b, c += events[j].c, j++;
    ans[queries[i].second] =
        a * queries[i].first * queries[i].first + b * queries[i].first + c;
  }
  long long int A = 0;
  for (i = 0; i < n; i++) {
    A += (long long int)p[(i + 1) % n].first * p[i].second;
    A -= (long long int)p[i].first * p[(i + 1) % n].second;
  }
  A = abs(A);
  for (i = 0; i < q; i++) printf("%.9lf\n", (double)A / 2 - ans[i]);
  return 0;
}
