#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
struct quad {
  long double A, B, C;
  quad(long double _A = 0, long double _B = 0, long double _C = 0) {
    A = _A;
    B = _B;
    C = _C;
  }
  long double eval(long double x) { return x * A * x + B * x + C; }
  void operator+=(quad Q) {
    A += Q.A;
    B += Q.B;
    C += Q.C;
  }
  quad operator-(quad Q) { return quad(A - Q.A, B - Q.B, C - Q.C); }
  quad operator*(long double t) { return quad(A * t, B * t, C * t); }
};
struct line {
  long double x1, x2, H;
  int t;
  line(long double _x1, long double _x2, long double _H, int _t) {
    x1 = min(_x1, _x2);
    x2 = max(_x1, _x2);
    H = _H;
    t = _t;
  }
  quad pol1() {
    if (x1 == x2) return quad();
    return quad(1, -2 * x1, x1 * x1) * (H / (2 * (x2 - x1))) * t;
  }
  quad pol2() { return quad(0, 2, -x1 - x2) * (H / 2) * t; }
};
vector<pair<int, int>> pts;
long double proj(int k, int l, long double Y) {
  if (Y == pts[k].second) return pts[k].first;
  if (Y == pts[l].second) return pts[l].first;
  if (pts[k].second == pts[l].second) return pts[k].second;
  return pts[l].first + (pts[k].first - pts[l].first) * (Y - pts[l].second) /
                            (long double)(pts[k].second - pts[l].second);
}
long double res[N];
int main() {
  int n, q;
  cin >> n >> q;
  pts.resize(n);
  int miny = 1e9, id;
  set<int> S;
  for (int i = 0; i < n; i++) {
    cin >> pts[i].first >> pts[i].second;
    S.insert(pts[i].second);
    if (pts[i].second < miny) {
      miny = pts[i].second;
      id = i;
    }
  }
  int l1 = id, r1 = id, l2 = (id + n - 1) % n, r2 = (id + 1) % n;
  vector<line> V;
  long double ans = 0;
  int prev = miny;
  S.erase(S.begin());
  for (auto it : S) {
    if ((it) > pts[l2].second) {
      l1 = l2;
      l2 = (l2 + n - 1) % n;
    }
    if ((it) > pts[r2].second) {
      r1 = r2;
      r2 = (r2 + 1) % n;
    }
    long double R1 = proj(r1, r2, prev), R2 = proj(r1, r2, it),
                L1 = proj(l1, l2, prev), L2 = proj(l1, l2, it), h = it - prev;
    V.push_back(line(R1, R2, h, -1));
    V.push_back(line((R1 + L1) / 2, (R2 + L2) / 2, h, 2));
    V.push_back(line(L1, L2, h, -1));
    ans += abs(h * (L1 - R1 + L2 - R2) / 2);
    prev = it;
  }
  vector<pair<long double, pair<int, quad>>> V2;
  for (int i = 0; i < q; i++) {
    int k;
    cin >> k;
    V2.push_back({k, {i, quad()}});
  }
  for (line i : V) {
    quad f = i.pol1();
    V2.push_back({i.x1, {-1, f}});
    V2.push_back({i.x2, {-1, i.pol2() - f}});
  }
  sort(V2.begin(), V2.end(),
       [](pair<long double, pair<int, quad>> a,
          pair<long double, pair<int, quad>> b) { return a.first < b.first; });
  quad fun;
  for (auto i : V2) {
    if (i.second.first == -1)
      fun += i.second.second;
    else {
      res[i.second.first] = ans + fun.eval(i.first);
    }
  }
  for (int i = 0; i < q; i++) {
    cout << fixed << setprecision(10) << res[i] << "\n";
  }
}
