#include <bits/stdc++.h>
using uint = unsigned int;
using cat = long long;
using dbl = long double;
constexpr dbl pi = 3.14159265358979323846;
using namespace std;
template <typename T>
T abs(T x) {
  return (x < 0) ? (-x) : x;
}
struct triv {
  vector<pair<dbl, dbl> > L, R, C;
};
triv splith(vector<pair<int, int> > L0, vector<pair<int, int> > R0) {
  vector<pair<dbl, dbl> > L = {{L0[0].first, L0[0].second}},
                          R = {{L0[0].first, L0[0].second}};
  int l = 0, r = 0, sz_l = L0.size(), sz_r = R0.size();
  while (l < sz_l - 2 || r < sz_r - 2) {
    if (L0[l + 1].second < R0[r + 1].second) {
      L.push_back({L0[l + 1].first, L0[l + 1].second});
      R.push_back({R.back().first + (L0[l + 1].second - R.back().second) /
                                        (R0[r + 1].second - R.back().second) *
                                        (R0[r + 1].first - R.back().first),
                   L0[l + 1].second});
      l++;
    } else if (L0[l + 1].second > R0[r + 1].second) {
      R.push_back({R0[r + 1].first, R0[r + 1].second});
      L.push_back({L.back().first + (R0[r + 1].second - L.back().second) /
                                        (L0[l + 1].second - L.back().second) *
                                        (L0[l + 1].first - L.back().first),
                   R0[r + 1].second});
      r++;
    } else {
      L.push_back({L0[l + 1].first, L0[l + 1].second});
      R.push_back({R0[r + 1].first, R0[r + 1].second});
      l++, r++;
    }
  }
  L.push_back({L0[sz_l - 1].first, L0[sz_l - 1].second});
  R.push_back({R0[sz_r - 1].first, R0[sz_r - 1].second});
  if (L[1].first > R[1].first) swap(L, R);
  vector<pair<dbl, dbl> > C;
  for (int i = 0; i < (int)L.size(); i++)
    C.push_back({(L[i].first + R[i].first) / 2, L[i].second});
  return {L, R, C};
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  int N, Q;
  cin >> N >> Q;
  vector<pair<int, int> > P(N);
  for (int i = 0; i < N; i++) cin >> P[i].first >> P[i].second;
  int mx = 0, mi = 0;
  for (int i = 0; i < N; i++)
    if (P[i].second < P[mi].second) mi = i;
  for (int i = 0; i < N; i++)
    if (P[i].second > P[mx].second) mx = i;
  vector<pair<int, int> > L0, R0;
  for (int i = mi; i != mx; i = (i + 1) % N) L0.push_back(P[i]);
  L0.push_back(P[mx]);
  for (int i = mi; i != mx; i = (i + N - 1) % N) R0.push_back(P[i]);
  R0.push_back(P[mx]);
  auto [L, R, C] = splith(L0, R0);
  vector<pair<int, int> > qu(Q);
  for (int i = 0; i < Q; i++) {
    cin >> qu[i].first;
    qu[i].second = i;
  }
  sort(begin(qu), end(qu));
  vector<pair<dbl, dbl> > ans(Q, {0, 0});
  {
    dbl c_quad = 0, c_lin = 0, c_const = 0;
    vector<pair<dbl, int> > bound_add, bound_sub;
    for (int i = 1; i < (int)L.size(); i++) {
      bound_sub.push_back({min(L[i].first, L[i - 1].first), 2 * i});
      bound_sub.push_back({max(L[i].first, L[i - 1].first), 2 * i + 1});
    }
    for (int i = 1; i < (int)C.size(); i++) {
      bound_add.push_back({min(C[i].first, C[i - 1].first), 2 * i});
      bound_add.push_back({max(C[i].first, C[i - 1].first), 2 * i + 1});
    }
    sort(begin(bound_add), end(bound_add));
    sort(begin(bound_sub), end(bound_sub));
    for (int i = 0, a = 0, b = 0; i < Q; i++) {
      while (a < (int)bound_add.size() && bound_add[a].first < qu[i].first) {
        int id = bound_add[a].second / 2, tp = bound_add[a].second % 2;
        a++;
        dbl dy = C[id].second - C[id - 1].second;
        dbl xl = min(C[id - 1].first, C[id].first);
        dbl xr = max(C[id - 1].first, C[id].first);
        if (tp == 0 && xr - xl > 1e-8) {
          c_quad += dy / 2. / (xr - xl);
          c_const += xl * xl * dy / 2. / (xr - xl);
          c_lin -= xl * dy / (xr - xl);
        }
        if (tp == 1 && xr - xl > 1e-8) {
          c_quad -= dy / 2. / (xr - xl);
          c_const -= xl * xl * dy / 2. / (xr - xl);
          c_lin += xl * dy / (xr - xl);
          c_const += (xr - xl) * dy / 2.;
        }
        if (tp == 1) {
          c_lin += dy;
          c_const -= dy * xr;
        }
      }
      while (b < (int)bound_sub.size() && bound_sub[b].first < qu[i].first) {
        int id = bound_sub[b].second / 2, tp = bound_sub[b].second % 2;
        b++;
        dbl dy = L[id].second - L[id - 1].second;
        dbl xl = min(L[id - 1].first, L[id].first);
        dbl xr = max(L[id - 1].first, L[id].first);
        if (tp == 0 && xr - xl > 1e-8) {
          c_quad -= dy / 2. / (xr - xl);
          c_const -= xl * xl * dy / 2. / (xr - xl);
          c_lin += xl * dy / (xr - xl);
        }
        if (tp == 1 && xr - xl > 1e-8) {
          c_quad += dy / 2. / (xr - xl);
          c_const += xl * xl * dy / 2. / (xr - xl);
          c_lin -= xl * dy / (xr - xl);
          c_const -= (xr - xl) * dy / 2.;
        }
        if (tp == 1) {
          c_lin -= dy;
          c_const += dy * xr;
        }
      }
      ans[qu[i].second].first =
          (c_quad * qu[i].first + c_lin) * qu[i].first + c_const;
    }
  }
  {
    dbl c_quad = 0, c_lin = 0, c_const = 0;
    vector<pair<dbl, int> > bound_add, bound_sub;
    for (int i = 1; i < (int)C.size(); i++) {
      bound_sub.push_back({min(C[i].first, C[i - 1].first), 2 * i});
      bound_sub.push_back({max(C[i].first, C[i - 1].first), 2 * i + 1});
    }
    for (int i = 1; i < (int)R.size(); i++) {
      bound_add.push_back({min(R[i].first, R[i - 1].first), 2 * i});
      bound_add.push_back({max(R[i].first, R[i - 1].first), 2 * i + 1});
    }
    sort(begin(bound_add), end(bound_add));
    sort(begin(bound_sub), end(bound_sub));
    for (int i = 0, a = 0, b = 0; i < Q; i++) {
      while (a < (int)bound_add.size() && bound_add[a].first < qu[i].first) {
        int id = bound_add[a].second / 2, tp = bound_add[a].second % 2;
        a++;
        dbl dy = R[id].second - R[id - 1].second;
        dbl xl = min(R[id - 1].first, R[id].first);
        dbl xr = max(R[id - 1].first, R[id].first);
        if (tp == 0 && xr - xl > 1e-8) {
          c_quad += dy / 2. / (xr - xl);
          c_const += xl * xl * dy / 2. / (xr - xl);
          c_lin -= xl * dy / (xr - xl);
        }
        if (tp == 1 && xr - xl > 1e-8) {
          c_quad -= dy / 2. / (xr - xl);
          c_const -= xl * xl * dy / 2. / (xr - xl);
          c_lin += xl * dy / (xr - xl);
          c_const += (xr - xl) * dy / 2.;
        }
        if (tp == 1) {
          c_lin += dy;
          c_const -= dy * xr;
        }
      }
      while (b < (int)bound_sub.size() && bound_sub[b].first < qu[i].first) {
        int id = bound_sub[b].second / 2, tp = bound_sub[b].second % 2;
        b++;
        dbl dy = C[id].second - C[id - 1].second;
        dbl xl = min(C[id - 1].first, C[id].first);
        dbl xr = max(C[id - 1].first, C[id].first);
        if (tp == 0 && xr - xl > 1e-8) {
          c_quad -= dy / 2. / (xr - xl);
          c_const -= xl * xl * dy / 2. / (xr - xl);
          c_lin += xl * dy / (xr - xl);
        }
        if (tp == 1 && xr - xl > 1e-8) {
          c_quad += dy / 2. / (xr - xl);
          c_const += xl * xl * dy / 2. / (xr - xl);
          c_lin -= xl * dy / (xr - xl);
          c_const -= (xr - xl) * dy / 2.;
        }
        if (tp == 1) {
          c_lin -= dy;
          c_const += dy * xr;
        }
      }
      ans[qu[i].second].second =
          (c_quad * qu[i].first + c_lin) * qu[i].first + c_const;
    }
  }
  dbl A = 0;
  for (int i = 1; i < N - 1; i++)
    A += 1LL * (P[i].first - P[0].first) * (P[i + 1].second - P[0].second) -
         1LL * (P[i].second - P[0].second) * (P[i + 1].first - P[0].first);
  if (A < 0) A = -A;
  for (int i = 0; i < Q; i++)
    cout << A / 2 - abs(ans[i].first - ans[i].second) << "\n";
}
