#include <bits/stdc++.h>
int m = 0;
struct V {
  int h;
  double x, a, b;
} vv[16 * 100000 + 100000];
void swap(double *a, double *b) {
  int tmp = *a;
  *a = *b, *b = tmp;
}
double hit(int x1, int y1, int x2, int y2, int y) {
  return x1 + (double)(x2 - x1) * (y - y1) / (y2 - y1);
}
int compare(const void *a, const void *b) {
  struct V *u = (struct V *)a, *v = (struct V *)b;
  return u->x == v->x ? 0 : (u->x < v->x ? -1 : 1);
}
void add(int y1, int y2, double xl1, double xr1, double xl2, double xr2,
         double c) {
  double a, b;
  vv[m++] = (struct V){-1, xl1, 0, -y1 * c};
  vv[m++] = (struct V){-1, xr1, 0, y1 * c};
  vv[m++] = (struct V){-1, xl2, 0, y2 * c};
  vv[m++] = (struct V){-1, xr2, 0, -y2 * c};
  if (xl1 != xl2) {
    a = (y2 - y1) / (xl2 - xl1), b = y1 - xl1 * a;
    vv[m++] = (struct V){-1, xl1, a * c, b * c};
    vv[m++] = (struct V){-1, xl2, -a * c, -b * c};
  }
  if (xr1 != xr2) {
    a = (y2 - y1) / (xr2 - xr1), b = y1 - xr1 * a;
    vv[m++] = (struct V){-1, xr1, -a * c, -b * c};
    vv[m++] = (struct V){-1, xr2, a * c, b * c};
  }
}
int main() {
  int xx[100000], yy[100000], n, q, i, j, i_ = 0, y;
  double ans[100000], a = 0, b = 0, c = 0;
  scanf("%d%d", &n, &q);
  for (i = 0; i < n; i++) scanf("%d%d", &xx[i], &yy[i]);
  for (i = 0; i < n - 1; i++)
    c += (long long)xx[i] * yy[i + 1] - (long long)xx[i + 1] * yy[i];
  c += (long long)xx[i] * yy[0] - (long long)xx[0] * yy[i];
  c = (((c) > 0) ? (c) : -(c)) / 2;
  for (i = 1; i < n; i++)
    if (yy[i_] > yy[i]) i_ = i;
  for (i = j = i_, y = yy[i_]; i == i_ || j == i_ || i != j;) {
    int i1 = i == 0 ? n - 1 : i - 1, j1 = j + 1 == n ? 0 : j + 1,
        y_ = (((yy[i1]) < (yy[j1])) ? (yy[i1]) : (yy[j1]));
    double xl = hit(xx[i], yy[i], xx[i1], yy[i1], y),
           xr = hit(xx[j], yy[j], xx[j1], yy[j1], y),
           xl_ = hit(xx[i], yy[i], xx[i1], yy[i1], y_),
           xr_ = hit(xx[j], yy[j], xx[j1], yy[j1], y_);
    if (xl > xr) swap(&xl, &xr);
    if (xl_ > xr_) swap(&xl_, &xr_);
    add(y, y_, xl, xr, xl_, xr_, -1);
    add(y, y_, (xl + xr) / 2, xr, (xl_ + xr_) / 2, xr_, 2);
    y = y_;
    if (yy[i1] == y_) i = i1;
    if (yy[j1] == y_) j = j1;
  }
  for (i = 0; i < q; i++) {
    scanf("%lf", &vv[m].x);
    vv[m++].h = i;
  }
  qsort(vv, m, sizeof *vv, compare);
  for (i = 0; i < m - 1; i++) {
    vv[i].h == -1 ? (a += vv[i].a, b += vv[i].b) : (ans[vv[i].h] = c);
    c += (a / 2 * vv[i + 1].x * vv[i + 1].x + b * vv[i + 1].x) -
         (a / 2 * vv[i].x * vv[i].x + b * vv[i].x);
  }
  if (vv[i].h != -1) ans[vv[i].h] = c;
  for (i = 0; i < q; i++) printf("%.10f\n", ans[i]);
  return 0;
}
