#include <bits/stdc++.h>
using namespace std;
using DO = double;
using pii = pair<int, int>;
using pdd = pair<DO, DO>;
const DO eps = 1e-8;
long long operator^(const pii& a, const pii& b) {
  return (long long)a.first * b.second - (long long)a.second * b.first;
}
const int N = 1e5 + 5;
int n, q;
pii p[N];
pii que[N];
pdd P[N << 1];
int sgn(const DO& a) { return a < -eps ? -1 : a > eps; }
struct beauty {
  pdd p[N << 1];
  DO ans[N];
  DO first[N << 1];
  DO dir[N << 1], oth[N << 1];
  DO L[N << 1], R[N << 1];
  int xn;
  int n;
  beauty() {
    n = 0;
    xn = 0;
  }
  void add(const pdd& a) { p[n++] = a; }
  DO get(const pdd& a, const pdd& b) {
    return (b.second - a.second) / (b.first - a.first);
  }
  void add(const pdd& a, const pdd& b) {
    int sa = sgn(a.first - b.first);
    int ax = lower_bound(first, first + xn, a.first - eps) - first;
    int bx = lower_bound(first, first + xn, b.first - eps) - first;
    if (sa < 0) {
      dir[ax] -= get(a, b);
      dir[bx] += get(a, b);
    } else if (sa > 0) {
      dir[bx] += get(b, a);
      dir[ax] -= get(b, a);
    } else {
      if (b.second > a.second + eps) {
        R[ax + 1] -= b.second - a.second;
        L[ax] -= b.second - a.second;
      } else {
        L[ax] += a.second - b.second;
        R[ax + 1] += a.second - b.second;
      }
    }
  }
  void solve() {
    p[n] = p[0];
    p[n + 1] = p[1];
    for (int i = 0; i < n; i++) {
      first[xn++] = p[i].first;
    }
    sort(first, first + xn);
    xn = unique(first, first + xn,
                [&](DO a, DO b) { return fabs(a - b) < eps; }) -
         first;
    for (int i = 0; i < n; i++) {
      add(p[i], p[i + 1]);
    }
    for (int i = 1; i < xn; i++) {
      L[i] += L[i - 1] + dir[i - 1] * (first[i] - first[i - 1]);
      R[i] += R[i - 1] + dir[i - 1] * (first[i] - first[i - 1]);
      dir[i] += dir[i - 1];
    }
    int pos = 0;
    DO crr = 0;
    while (pos < q && que[pos].first < first[0] + eps) {
      ans[que[pos].second] = 0;
      pos++;
    }
    for (int i = 0; i + 1 < xn; i++) {
      while (pos < q && que[pos].first < first[i + 1] + eps) {
        ans[que[pos].second] =
            crr + (L[i] + L[i] +
                   (R[i + 1] - L[i]) * ((que[pos].first - first[i]) /
                                        (first[i + 1] - first[i]))) *
                      (que[pos].first - first[i]) / 2;
        pos++;
      }
      crr += (L[i] + R[i + 1]) * (first[i + 1] - first[i]) / 2;
    }
    while (pos < q) {
      ans[que[pos].second] = crr;
      pos++;
    }
  }
} L, R;
int main() {
  cin >> n >> q;
  int id = 0;
  long long area = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &p[i].first, &p[i].second);
  }
  n = unique(p, p + n) - p;
  for (int i = 0; i < q; i++) {
    scanf("%d", &que[i].first);
    que[i].second = i;
  }
  sort(que, que + q);
  p[n] = p[0];
  int mn = 0;
  for (int i = 0; i < n; i++) {
    area += p[i] ^ p[i + 1];
    if (p[i].second < p[mn].second) {
      mn = i;
    }
  }
  rotate(p, p + mn, p + n);
  p[n] = p[0];
  if (area < 0) {
    area = -area;
    reverse(p + 1, p + n);
  }
  int a = n - 1, b = 1;
  int m = 0;
  while (a != b) {
    if (p[a].second == p[b].second) {
      P[m++] = pdd((p[a].first + p[b].first) / 2., p[a].second);
      a--, b++;
    } else if (p[a].second < p[b].second) {
      P[m++] = pdd((p[b - 1].first +
                    (p[b].first - p[b - 1].first) *
                        ((DO)(p[a].second - p[b - 1].second) /
                         (p[b].second - p[b - 1].second)) +
                    p[a].first) /
                       2,
                   p[a].second);
      a--;
    } else {
      P[m++] = pdd((p[a + 1].first +
                    (p[a].first - p[a + 1].first) *
                        ((DO)(p[b].second - p[a + 1].second) /
                         (p[a].second - p[a + 1].second)) +
                    p[b].first) /
                       2,
                   p[b].second);
      b++;
    }
  }
  for (int i = 0; i <= a; i++) {
    R.add(p[i]);
  }
  for (int i = m; i--;) {
    R.add(P[i]);
  }
  for (int i = 0; i < m; i++) {
    L.add(P[i]);
  }
  for (int i = a; i <= n; i++) {
    L.add(p[i]);
  }
  L.solve();
  R.solve();
  for (int i = 0; i < q; i++) {
    printf("%.8lf\n", area / 2. - L.ans[i] + R.ans[i]);
  }
  return 0;
}
