#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
using namespace std;
template <typename T>
void maxtt(T &t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T &t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
const long long MOD2 = (long long)998244353 * (long long)998244353;
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 998244353) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 998244353) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
struct Point {
  long double x, y;
  Point() {}
  Point(long double x, long double y) : x(x), y(y) {}
  long double abs() const { return hypot(x, y); }
  long double arg() const { return atan2(y, x); }
  Point operator*(double o) const { return Point(x * o, y * o); }
  Point operator+(const Point &o) const { return Point(x + o.x, y + o.y); }
  Point operator-(const Point &o) const { return Point(x - o.x, y - o.y); }
  Point operator/(double o) const { return Point(x / o, y / o); }
  bool operator<(const Point &o) const {
    return x < o.x - 1e-9 || (x < o.x + 1e-9 && y < o.y - 1e-9);
  }
  friend bool operator==(const Point &r1, const Point &r2) {
    return r1.x == r2.x && r1.y == r2.y;
  }
  Point scale(double o) const { return *this * (o / abs()); }
  Point rotY() const { return Point(-y, x); }
  Point rotX() const { return Point(y, -x); }
  long double cross(Point b) const { return x * b.y - b.x * y; }
  void readin() { scanf("%Lf%Lf", &x, &y); }
} p[(100035)];
vector<tuple<long double, int, long double, long double>> vp;
void add(Point &p, Point &q, int k) {
  if (abs(q.x - p.x) < 1e-10) return;
  if (p.x > q.x) return add(q, p, -k);
  long double A = (q.y - p.y) / (q.x - p.x);
  long double B = p.y - p.x * A;
  vp.emplace_back(p.x, 0, k * A, k * B);
  vp.emplace_back(q.x, 0, -k * A, -k * B);
}
Point cp(Point s, Point t, Point q) {
  if (abs(s.x - t.x) < 1e-9) return {s.x, q.y};
  long double k = (s.y - t.y) / (s.x - t.x);
  long double b = s.y - k * s.x;
  return {(q.y - b) / k, q.y};
}
long double ans[(100035)];
void fmain(int tid) {
  scanf("%d%d", &n, &m);
  int idx = 0;
  for (int(i) = 0; (i) < (int)(n); (i)++) p[i].readin();
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    if (p[i].y < p[idx].y) idx = i;
  }
  for (int(i) = 1; (i) <= (int)(m); (i)++) {
    int x;
    scanf("%d", &x);
    vp.push_back({x, i, -1, -1});
  }
  long double area = 0;
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    int j = (i + 1) % n;
    area += p[i].cross(p[j]);
    if (p[i].y > p[j].y)
      add(p[i], p[j], 1);
    else
      add(p[j], p[i], 1);
  }
  area = abs(area) / 2;
  rotate(p, p + idx, p + n);
  Point mid = p[0], mid2;
  int L = 0, R = 0;
  for (int(i) = 0; (i) < (int)(n - 1); (i)++) {
    int L2 = L + 1;
    int R2 = (R + n - 1) % n;
    if (p[L2].y < p[R2].y) {
      mid2 = (p[L2] + cp(p[R], p[R2], p[L2])) * 0.5;
      L = L2;
    } else {
      mid2 = (p[R2] + cp(p[L], p[L2], p[R2])) * 0.5;
      R = R2;
    }
    add(mid, mid2, 2);
    mid = mid2;
  }
  sort(vp.begin(), vp.end());
  long double a = 0, b = 0;
  for (auto &e : vp) {
    int idx;
    long double pos, A, B;
    tie(pos, idx, A, B) = e;
    if (idx > 0) {
      ans[idx] = area + (0.5 * a * pos * pos + b * pos);
    } else {
      area -= (0.5 * A * pos * pos + B * pos);
      a += A;
      b += B;
    }
  }
  for (int(i) = 1; (i) <= (int)(m); (i)++) printf("%.10Lf\n", ans[i]);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
