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 = 0.000001;
struct P {
  long double x, y;
};
P input[300010];
pair<int, int> f[100010];
long double wsp[100010][3];
long double answer[100010];
inline long double x_by_y(P p1, P p2, double y) {
  return y * (p1.x - p2.x) / (p1.y - p2.y) + p1.x -
         p1.y * (p1.x - p2.x) / (p1.y - p2.y);
}
inline long double c(long double x1, long double x2, long double x3,
                     long double x4, long double y1, long double y2,
                     long double ff) {
  return ff * 2 * (y1 - y2) / (x1 + x3 - x2 - x4) + y1 -
         (y1 - y2) * (x1 + x3) / (x1 + x3 - x2 - x4);
}
inline int bs(int n, long double x) {
  if (f[n].first < x - EPS) return n + 1;
  int b = 1, e = n;
  while (b < e) {
    int mid = (b + e) / 2;
    if (f[mid].first >= x - EPS)
      e = mid;
    else
      b = mid + 1;
  }
  return b;
}
inline int bs_c(int b, int e, long double x1, long double x2, long double x3,
                long double x4, long double y1, long double y2, long double x) {
  while (b < e) {
    int mid = (b + e) / 2;
    if (c(x1, x2, x3, x4, y1, y2, f[mid].first) < x)
      b = mid + 1;
    else
      e = mid;
  }
  if (c(x1, x2, x3, x4, y1, y2, f[b].first) < x) return b + 1;
  return b;
}
inline pair<int, int> bs_interval_c(int beg, int en, long double x1,
                                    long double x2, long double x3,
                                    long double x4, long double y1,
                                    long double y2) {
  if (beg > en) return {beg, en};
  if (x3 - x4 < x2 - x1) {
    swap(x1, x2);
    swap(x3, x4);
  }
  return {bs_c(beg, en, x1, x2, x3, x4, y1, y2, y2),
          bs_c(beg, en, x1, x2, x3, x4, y1, y2, y1) - 1};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(6);
  int n, q, max_y, g_max_y, i, j;
  long double x1, x3, y1, y2, x2, x4;
  cin >> n >> q;
  for (i = 1; i <= n; i++) {
    cin >> input[i].x >> input[i].y;
    input[2 * n + i] = input[n + i] = input[i];
  }
  for (i = 1; i <= q; i++) {
    cin >> f[i].first;
    f[i].second = i;
  }
  sort(f + 1, f + q + 1);
  max_y = input[n + 1].y;
  g_max_y = n + 1;
  for (i = n + 2; i <= 2 * n; i++) {
    if (input[i].y > max_y) {
      max_y = input[i].y;
      g_max_y = i;
    }
  }
  if (x_by_y(input[g_max_y], input[g_max_y - 1], max_y - 1) >
      x_by_y(input[g_max_y], input[g_max_y + 1], max_y - 1)) {
    for (i = 1; i < n - i + 1; i++) swap(input[i], input[n - i + 1]);
    for (i = 1; i <= n; i++) input[2 * n + i] = input[n + i] = input[i];
    g_max_y = 3 * n - g_max_y + 1;
  }
  x1 = x3 = input[g_max_y].x;
  y1 = max_y;
  for (i = g_max_y - 1, j = g_max_y + 1; j - i - 1 < n;) {
    y2 = max(input[i].y, input[j].y);
    x2 = x_by_y(input[i + 1], input[i], y2);
    x4 = x_by_y(input[j - 1], input[j], y2);
    int left_no = bs(q, min(x1, x2)) - 1, right_no = bs(q, max(x3, x4)), beg,
        en;
    wsp[1][0] += (x3 - x1 + x4 - x2) * (y1 - y2);
    wsp[left_no + 1][0] -= (x3 - x1 + x4 - x2) * (y1 - y2);
    wsp[right_no][0] += (x3 - x1 + x4 - x2) * (y1 - y2);
    wsp[q + 1][0] -= (x3 - x1 + x4 - x2) * (y1 - y2);
    if (x1 + x3 == x2 + x4) {
      int b = left_no + 1, e = right_no - 1;
      if (f[right_no - 1].first - x1 < x3 - f[right_no - 1].first) b = right_no;
      while (b < e) {
        int mid = (b + e) / 2;
        if (f[mid].first - x1 > x3 - f[mid].first)
          e = mid;
        else
          b = mid + 1;
      }
      beg = b;
      en = b - 1;
    } else {
      pair<int, int> tmp =
          bs_interval_c(left_no + 1, right_no - 1, x1, x2, x3, x4, y1, y2);
      beg = tmp.first;
      en = tmp.second;
    }
    bool ch = false;
    int sgn = 1;
    if (x3 - x4 > x2 - x1) {
      ch = true;
      sgn = -1;
      swap(x1, x3);
      swap(x2, x4);
      x1 = -x1;
      x2 = -x2;
      x3 = -x3;
      x4 = -x4;
    }
    if (beg <= en) {
      long double a1 = (x1 - x2) / (y1 - y2);
      long double b1 = x1 - y1 * (x1 - x2) / (y1 - y2);
      long double a2 = (x3 - x4) / (y1 - y2);
      long double b2 = x3 - y1 * (x3 - x4) / (y1 - y2);
      long double ac = 2 * (y1 - y2) / (x1 + x3 - x2 - x4);
      long double bc = y1 - (y1 - y2) * (x1 + x3) / (x1 + x3 - x2 - x4);
      long double k1 = 2 - a1 * ac, l1 = -x1 - a1 * bc - b1;
      long double k2 = -ac, l2 = y1 - bc;
      long double k3 = -2 + a2 * ac, l3 = x4 + a2 * bc + b2;
      long double k4 = ac, l4 = bc - y2;
      wsp[beg][2] += k1 * k2 + k3 * k4;
      wsp[en + 1][2] -= k1 * k2 + k3 * k4;
      wsp[beg][1] += (k1 * l2 + k2 * l1 + k3 * l4 + k4 * l3) * sgn;
      wsp[en + 1][1] -= (k1 * l2 + k2 * l1 + k3 * l4 + k4 * l3) * sgn;
      wsp[beg][0] += l1 * l2 + l3 * l4;
      wsp[en + 1][0] -= l1 * l2 + l3 * l4;
    }
    if (ch) {
      sgn = 1;
      swap(x1, x3);
      swap(x2, x4);
      x1 = -x1;
      x2 = -x2;
      x3 = -x3;
      x4 = -x4;
    }
    wsp[left_no + 1][1] += (-2 * (y1 - y2)) * sgn;
    wsp[beg][1] -= (-2 * (y1 - y2)) * sgn;
    wsp[left_no + 1][0] += (x3 + x4) * (y1 - y2);
    wsp[beg][0] -= (x3 + x4) * (y1 - y2);
    wsp[en + 1][1] += (2 * (y1 - y2)) * sgn;
    wsp[right_no][1] -= (2 * (y1 - y2)) * sgn;
    wsp[en + 1][0] += -(x1 + x2) * (y1 - y2);
    wsp[right_no][0] -= -(x1 + x2) * (y1 - y2);
    int left_sub = bs(q, max(x1, x2)) - 1, right_sub = bs(q, min(x3, x4));
    if (abs(x1 - x2) > EPS) {
      long double ac = (y1 - y2) / (x1 - x2);
      long double bc = y1 - x1 * (y1 - y2) / (x1 - x2);
      if (x1 > x2) {
        wsp[left_no + 1][2] -= ac;
        wsp[left_sub + 1][2] += ac;
        wsp[left_no + 1][1] -= (-y1 + bc - ac * x1) * sgn;
        wsp[left_sub + 1][1] += (-y1 + bc - ac * x1) * sgn;
        wsp[left_no + 1][0] -= x1 * y1 - x1 * bc;
        wsp[left_sub + 1][0] += x1 * y1 - x1 * bc;
      } else {
        wsp[left_no + 1][2] -= -ac;
        wsp[left_sub + 1][2] += -ac;
        wsp[left_no + 1][1] -= (y2 - bc + ac * x2) * sgn;
        wsp[left_sub + 1][1] += (y2 - bc + ac * x2) * sgn;
        wsp[left_no + 1][0] -= x2 * bc - x2 * y2;
        wsp[left_sub + 1][0] += x2 * bc - x2 * y2;
      }
    }
    if (abs(x3 - x4) > EPS) {
      long double ac = (y1 - y2) / (x3 - x4);
      long double bc = y1 - x3 * (y1 - y2) / (x3 - x4);
      if (x3 < x4) {
        wsp[right_sub][2] -= -ac;
        wsp[right_no][2] += -ac;
        wsp[right_sub][1] -= (y1 - bc + ac * x3) * sgn;
        wsp[right_no][1] += (y1 - bc + ac * x3) * sgn;
        wsp[right_sub][0] -= x3 * bc - x3 * y1;
        wsp[right_no][0] += x3 * bc - x3 * y1;
      } else {
        wsp[right_sub][2] -= ac;
        wsp[right_no][2] += ac;
        wsp[right_sub][1] -= (bc - y2 - ac * x4) * sgn;
        wsp[right_no][1] += (bc - y2 - ac * x4) * sgn;
        wsp[right_sub][0] -= x4 * y2 - x4 * bc;
        wsp[right_no][0] += x4 * y2 - x4 * bc;
      }
    }
    if (input[i].y > input[j].y)
      i--;
    else if (input[j].y > input[i].y)
      j++;
    else {
      i--;
      j++;
    }
    y1 = y2;
    x1 = x2;
    x3 = x4;
  }
  for (i = 1; i <= q; i++) {
    wsp[i][0] += wsp[i - 1][0];
    wsp[i][1] += wsp[i - 1][1];
    wsp[i][2] += wsp[i - 1][2];
    answer[f[i].second] = wsp[i][2] * f[i].first * f[i].first +
                          wsp[i][1] * f[i].first + wsp[i][0];
  }
  for (i = 1; i <= q; i++) cout << answer[i] / 2 << "\n";
  return 0;
}
