#include <bits/stdc++.h>
using namespace std;
std::mt19937 rnd(
    (int)std::chrono::steady_clock::now().time_since_epoch().count());
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 100000;
const int MAXQ = 100000;
const double eps = 1e-9;
struct P {
  int x, y;
  P() {}
  P(int x, int y) : x(x), y(y) {}
};
P operator-(const P &a, const P &b) { return P(a.x - b.x, a.y - b.y); }
long long operator^(const P &a, const P &b) {
  return (long long)a.x * b.y - (long long)a.y * b.x;
}
int side(const P &a, const P &b, const P &c) {
  long long res = (b - a) ^ (c - a);
  return res < 0 ? -1 : res > 0 ? +1 : 0;
}
int n, nq;
P p[MAXN + 1];
int qx[MAXQ];
double qans[MAXQ];
int gmnx, gmxx;
void normalize() {
  int mnyidx = 0;
  for (int i = (1); i < (n); ++i)
    if (p[i].y < p[mnyidx].y) mnyidx = i;
  rotate(p, p + mnyidx, p + n);
  if (side(p[0], p[1], p[n - 1]) > 0) reverse(p + 1, p + n);
  p[n] = p[0];
  gmnx = p[0].x;
  for (int i = (1); i < (n); ++i) gmnx = min(gmnx, p[i].x);
  gmxx = p[0].x;
  for (int i = (1); i < (n); ++i) gmxx = max(gmxx, p[i].x);
}
double getx(const P &a, const P &b, int y) {
  assert(a.y < b.y && a.y <= y && y <= b.y);
  return a.x + 1.0 * (y - a.y) / (b.y - a.y) * (b.x - a.x);
}
struct Part {
  double lx, hx, a, b, c;
  Part() {}
  Part(double lx, double hx, double a, double b, double c)
      : lx(lx), hx(hx), a(a), b(b), c(c) {}
  bool isinside(int x) { return x >= lx - eps && x <= hx - eps; }
  double get(int x) { return a * x * x + b * x + c; }
};
vector<Part> parts;
void buildvarupper(double lx, double hx, double ly, double e, double f,
                   double a, double b, double c) {
  parts.push_back(Part(lx, hx, +a * e + 0.5 * b * e * e,
                       a * f + b * e * f + c * e - a * ly,
                       0.5 * b * f * f + c * f - 0.5 * b * ly * ly - c * ly));
}
void buildvarlower(double lx, double hx, double e, double f, double hy,
                   double a, double b, double c) {
  parts.push_back(Part(lx, hx, -a * e - 0.5 * b * e * e,
                       a * hy - a * f - b * e * f - c * e,
                       0.5 * b * hy * hy + c * hy - 0.5 * b * f * f - c * f));
}
void buildfixed(double lx, double hx, double ly, double hy, double a, double b,
                double c) {
  parts.push_back(Part(lx, hx, 0, a * (hy - ly),
                       0.5 * b * (hy * hy - ly * ly) + c * (hy - ly)));
}
void buildbelow(double a, double b, double c, int ly, int hy, double e,
                double f) {
  assert(fabs(e) > eps && ly < hy);
  if (e > 0) {
    double lx = (ly - f) / e, hx = (hy - f) / e;
    buildvarupper(lx, hx, ly, e, f, a, b, c);
    buildfixed(hx, gmxx, ly, hy, a, b, c);
  } else {
    double hx = (ly - f) / e, lx = (hy - f) / e;
    buildfixed(gmnx, lx, ly, hy, a, b, c);
    buildvarupper(lx, hx, ly, e, f, a, b, c);
  }
}
void buildabove(double a, double b, double c, int ly, int hy, double e,
                double f) {
  assert(fabs(e) > eps && ly < hy);
  if (e > 0) {
    double lx = (ly - f) / e, hx = (hy - f) / e;
    buildfixed(gmnx, lx, ly, hy, a, b, c);
    buildvarlower(lx, hx, e, f, hy, a, b, c);
  } else {
    double hx = (ly - f) / e, lx = (hy - f) / e;
    buildvarlower(lx, hx, e, f, hy, a, b, c);
    buildfixed(hx, gmxx, ly, hy, a, b, c);
  }
}
void buildparts() {
  parts.clear();
  int l = 0, r = n, ly = p[l].y;
  int mxyidx = 0;
  for (int i = (1); i < (n); ++i)
    if (p[i].y > p[mxyidx].y) mxyidx = i;
  while (l < mxyidx && r > mxyidx) {
    assert(ly >= p[l].y && ly >= p[r].y);
    int hy = min(p[l + 1].y, p[r - 1].y);
    assert(hy > ly);
    double lx1 = getx(p[l], p[l + 1], ly), lx2 = getx(p[l], p[l + 1], hy),
           mnlx = min(lx1, lx2), mxlx = max(lx1, lx2);
    double rx1 = getx(p[r], p[r - 1], ly), rx2 = getx(p[r], p[r - 1], hy),
           mnrx = min(rx1, rx2), mxrx = max(rx1, rx2);
    double a = (lx2 - lx1) / (hy - ly), b = lx1 - a * ly;
    double c = (rx2 - rx1) / (hy - ly), d = rx1 - c * ly;
    if (fabs(a + c) > eps) {
      double e = 2 / (a + c), f = -(b + d) / (a + c);
      if (a + c > 0) {
        buildbelow(+1, -a, -b, ly, hy, e, f);
        buildabove(-1, +c, +d, ly, hy, e, f);
      } else {
        buildabove(+1, -a, -b, ly, hy, e, f);
        buildbelow(-1, +c, +d, ly, hy, e, f);
      }
    } else {
      double mx = (b + d) / 2;
      if (mx <= gmnx + eps) {
        buildfixed(gmnx, gmxx, ly, hy, -1, +c, +d);
      } else if (mx >= gmxx - eps) {
        buildfixed(gmnx, gmxx, ly, hy, +1, -a, -b);
      } else {
        buildfixed(gmnx, mx, ly, hy, -1, +c, +d);
        buildfixed(mx, gmxx, ly, hy, +1, -a, -b);
      }
    }
    if (fabs(mnlx - gmnx) > eps)
      parts.push_back(
          Part(gmnx, mnlx, 0, hy - ly,
               -1.0 * (hy - ly) * mnlx - 0.5 * (hy - ly) * (mxlx - mnlx)));
    if (fabs(mxlx - mnlx) > eps) {
      double z = 0.5 * (hy - ly) / (mxlx - mnlx);
      parts.push_back(Part(mnlx, mxlx, -z, +2 * z * mxlx, -z * mxlx * mxlx));
    }
    if (fabs(mxrx - mnrx) > eps) {
      double z = 0.5 * (hy - ly) / (mxrx - mnrx);
      parts.push_back(Part(mnrx, mxrx, -z, +2 * z * mnrx, -z * mnrx * mnrx));
    }
    if (fabs(gmxx - mxrx) > eps)
      parts.push_back(
          Part(mxrx, gmxx, 0, -(hy - ly),
               1.0 * (hy - ly) * mxrx - 0.5 * (hy - ly) * (mxrx - mnrx)));
    ly = hy;
    if (p[l + 1].y == ly) ++l;
    if (p[r - 1].y == ly) --r;
  }
}
struct E {
  double x, a, b, c;
  E() {}
  E(double x, double a, double b, double c) : x(x), a(a), b(b), c(c) {}
};
bool operator<(const E &p, const E &q) { return p.x < q.x; }
pair<int, int> o[MAXQ];
vector<E> e;
void solvequeries() {
  for (int i = (0); i < (nq); ++i) o[i] = make_pair(qx[i], i);
  sort(o, o + nq);
  e.clear();
  for (int i = (0); i < (((int)(parts).size())); ++i) {
    Part p = parts[i];
    e.push_back(E(p.lx - eps, +p.a, +p.b, +p.c));
    e.push_back(E(p.hx - eps, -p.a, -p.b, -p.c));
  }
  sort(e.begin(), e.end());
  double a = 0, b = 0, c = 0;
  int at = 0;
  for (int i = (0); i < (nq); ++i) {
    int id = o[i].second;
    int x = qx[id];
    while (at < ((int)(e).size()) && e[at].x < x) {
      a += e[at].a, b += e[at].b, c += e[at].c;
      ++at;
    }
    qans[id] = a * x * x + b * x + c;
  }
}
void solve() {
  normalize();
  buildparts();
  solvequeries();
}
void run() {
  scanf("%d%d", &n, &nq);
  for (int i = (0); i < (n); ++i) scanf("%d%d", &p[i].x, &p[i].y);
  for (int i = (0); i < (nq); ++i) scanf("%d", &qx[i]);
  solve();
  for (int i = (0); i < (nq); ++i) printf("%.15lf\n", qans[i]);
}
int main() {
  run();
  return 0;
}
