After being discouraged by 13 time-limit-exceeded verdicts on an ugly geometry problem, you decided to take a relaxing break for arts and crafts.

There is a piece of paper in the shape of a simple polygon with n vertices. The polygon may be non-convex, but we all know that proper origami paper has the property that any horizontal line intersects the boundary of the polygon in at most two points.

If you fold the paper along the vertical line x=f, what will be the area of the resulting shape? When you fold, the part of the paper to the left of the line is symmetrically reflected on the right side.

<image>

Your task is to answer q independent queries for values f_1,…,f_q.

Input

The first line contains two integers n, q (3≤ n≤ 10^5, 1≤ q≤ 10^5) — the number of polygon vertices and queries, respectively.

Each of the next n lines contains two integers x_i, y_i (|x_i|, |y_i|≤ 10^5) — the coordinates of the i-th point of the polygon. The polygon has an edge connecting each pair of adjacent points in the input, and also an edge between (x_1,y_1) and (x_n,y_n). It is guaranteed that the polygon is non-degenerate and that any horizontal line intersects the boundary of the polygon in at most two points. In particular, no boundary edge is strictly horizontal. Two adjacent sides may be collinear.

Each of the next q lines contains a single integer f_i (min_{j=1}^n(x_j)< f_i< max_{j=1}^n(x_j)) — the x-coordinate of the i-th fold query. It is guaranteed that all f_i are distinct.

Output

For each query, output the area A_i of the paper if you fold it along the line x=f_i.

Your answer is considered correct if its absolute or relative error does not exceed 10^{-4}.

Formally, let your answer be a, and the jury's answer be b. Your answer is accepted if and only if \frac{|a - b|}{max{(1, |b|)}} ≤ 10^{-4}.

Examples

Input


4 7
0 10
10 0
0 -10
-10 0
-9
-5
-1
0
1
5
9


Output


199.0000000000
175.0000000000
119.0000000000
100.0000000000
119.0000000000
175.0000000000
199.0000000000


Input


4 1
0 0
0 2
2 4
2 2
1


Output


3.0000000000


Input


9 4
0 -3
2 -2
-1 -1
0 4
2 5
1 6
-2 3
-1 1
-3 0
0
-2
-1
1


Output


11.1250000000
11.7500000000
10.3446969697
11.3333333333

Note

The first test, with the fold f=-5:

<image>

The second test, with the fold f=1:

<image>

The third test, with the fold f=-1:

<image>
#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-10;
int n, q, t;
double plc[500005], ans[500005];
struct Point {
  long double x, y;
  Point() {}
  Point(long double _x, long double _y) { x = _x, y = _y; }
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
} P[500005], Q[500005];
struct Node {
  long double x, m, c;
  int d;
  Node() {}
  Node(long double _x, long double _m, long double _c, int _d) {
    x = _x, m = _m, c = _c, d = _d;
  }
  bool operator<(const Node &p) const { return x < p.x; }
} V[500005];
void Add(Point a, Point b, int v) {
  if (abs(b.x - a.x) < eps) return;
  if (a.x > b.x) {
    swap(a, b);
    v *= -1;
  }
  long double m = (b.y - a.y) / (b.x - a.x), c = a.y - a.x * m;
  V[++t] = Node(a.x, v * m, v * c, 0);
  V[++t] = Node(b.x, -v * m, -v * c, 0);
  return;
}
Point Calc(Point a, Point b, Point p) {
  return Point((b.x - a.x) * (p.y - a.y) / (b.y - a.y) + a.x, p.y);
}
int main() {
  scanf("%d%d", &n, &q);
  int p = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    P[i] = Point(x, y);
    if (P[i].y < P[p].y) p = i;
  }
  for (int i = 1; i <= q; i++) {
    double x;
    scanf("%lf", &x);
    plc[i] = x;
    V[i] = Node(x, -1, -1, i);
  }
  t = q;
  long double all = 0;
  for (int i = 0; i < n; i++) {
    all += P[i].x * P[(i + 1) % n].y - P[(i + 1) % n].x * P[i].y;
    if (P[i].y < P[(i + 1) % n].y)
      Add(P[i], P[(i + 1) % n], -1);
    else
      Add(P[(i + 1) % n], P[i], -1);
  }
  all = abs(all / 2);
  int s = 0;
  for (int i = p; i < n; i++) Q[s++] = P[i];
  for (int i = 0; i < p; i++) Q[s++] = P[i];
  for (int i = 0; i < n; i++) P[i] = Q[i];
  int lf = 0, rg = 0;
  Point lst = P[0];
  for (int i = 0; i < n - 1; i++) {
    int L = (lf + 1) % n, R = (rg + n - 1) % n;
    Point now;
    if (P[L].y < P[R].y) {
      Point tmp = Calc(P[rg], P[R], P[L]) + P[L];
      now.x = tmp.x * 0.5, now.y = tmp.y * 0.5;
      lf = L;
    } else {
      Point tmp = Calc(P[lf], P[L], P[R]) + P[R];
      now.x = tmp.x * 0.5;
      now.y = tmp.y * 0.5;
      rg = R;
    }
    Add(lst, now, 2);
    lst = now;
  }
  sort(V + 1, V + t + 1);
  long double a = 0.0, b = 0.0;
  for (int i = 1; i <= t; i++) {
    long double x = V[i].x, m = V[i].m, c = V[i].c;
    if (V[i].d > 0)
      ans[V[i].d] = all + (0.5 * a * x * x + b * x);
    else {
      all -= 0.5 * m * x * x + c * x;
      a += m, b += c;
    }
  }
  for (int i = 1; i <= q; i++) printf("%.10lf\n", (double)ans[i]);
}
