#include <bits/stdc++.h>
using namespace std;
double a = 0, b = 0, c = 0;
vector<double> results;
class Event {
 public:
  virtual void process() = 0;
};
class Query : public Event {
  int id;
  double x;

 public:
  Query(int id_, double x_) : id(id_), x(x_) {}
  void process() { results[id] = x * x * a + x * b + c; }
};
class Change : public Event {
  double delta_a, delta_b, delta_c;

 public:
  Change(double da, double db, double dc)
      : delta_a(da), delta_b(db), delta_c(dc) {}
  void process() {
    a += delta_a;
    b += delta_b;
    c += delta_c;
  }
};
struct Point {
  double x, y;
  Point(double x_ = 0, double y_ = 0) : x(x_), y(y_) {}
  Point operator-(const Point &other) const {
    return Point(x - other.x, y - other.y);
  }
};
double interpolate(Point A, Point B, double y) {
  double wA = (B.y - y) / (B.y - A.y);
  double wB = 1 - wA;
  return A.x * wA + B.x * wB;
}
void register_frontier(double x1, double x2, double h, double weight,
                       vector<pair<double, Event *>> &events) {
  if (x1 == x2) {
    events.emplace_back(x1, new Change(0, h * weight, -x1 * h * weight));
  } else {
    double factor = h / (2 * (x2 - x1));
    events.emplace_back(x1,
                        new Change(factor * weight, -2 * x1 * factor * weight,
                                   x1 * x1 * factor * weight));
    events.emplace_back(
        x2, new Change(-factor * weight, (2 * x1 * factor + h) * weight,
                       (-x1 * x1 * factor - (x1 + x2) / 2 * h) * weight));
  }
}
void register_quad(Point A, Point B, Point C, Point D,
                   vector<pair<double, Event *>> &events) {
  double height = B.y - A.y;
  double low_width = C.x - A.x;
  double high_width = D.x - B.x;
  double area = (low_width + high_width) / 2 * height;
  c += area;
  double top_mid_x = (B.x + D.x) / 2;
  double bot_mid_x = (A.x + C.x) / 2;
  register_frontier(min(A.x, B.x), max(A.x, B.x), height, -1, events);
  register_frontier(min(C.x, D.x), max(C.x, D.x), height, -1, events);
  register_frontier(min(top_mid_x, bot_mid_x), max(top_mid_x, bot_mid_x),
                    height, 2, events);
}
double cross(Point u, Point v) { return u.x * v.y - u.y * v.x; }
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  results.resize(q, -1);
  vector<Point> vertices(n);
  int max_y = -1023456789, min_y = 1023456789;
  int top = -1, bottom = -1;
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &vertices[i].x, &vertices[i].y);
    if (vertices[i].y > max_y) {
      max_y = vertices[i].y;
      top = i;
    }
    if (vertices[i].y < min_y) {
      min_y = vertices[i].y;
      bottom = i;
    }
  }
  vector<Point> left, right;
  for (int i = bottom; i != top; i = (i + 1) % n) {
    right.push_back(vertices[i]);
  }
  right.push_back(vertices[top]);
  for (int i = bottom; i != top; i = (i + n - 1) % n) {
    left.push_back(vertices[i]);
  }
  left.push_back(vertices[top]);
  Point L = left[1], P = vertices[bottom], R = right[1];
  if (cross(P - L, R - P) < 0) swap(left, right);
  vector<pair<double, Event *>> events;
  unsigned left_i = 0, right_i = 0;
  double y = min_y;
  double left_x = vertices[bottom].x, right_x = vertices[bottom].x;
  while (left_i + 1 < left.size() && right_i + 1 < right.size()) {
    Point A(left_x, y), C(right_x, y);
    if (left[left_i + 1].y > right[right_i + 1].y) {
      right_i++;
      y = right[right_i].y;
      right_x = right[right_i].x;
      left_x = interpolate(left[left_i], left[left_i + 1], y);
    } else {
      left_i++;
      y = left[left_i].y;
      left_x = left[left_i].x;
      right_x = interpolate(right[right_i], right[right_i + 1], y);
    }
    Point B(left_x, y), D(right_x, y);
    register_quad(A, B, C, D, events);
  }
  for (int i = 0; i < q; i++) {
    double x;
    scanf("%lf", &x);
    events.emplace_back(x, new Query(i, x));
  }
  sort(events.begin(), events.end());
  for (auto p : events) {
    p.second->process();
    delete p.second;
  }
  for (double result : results) {
    printf("%.20lf\n", result);
  }
  return 0;
}
