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;
template <class T>
int chkmax(T &a, T b) {
  if (b > a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
int chkmin(T &a, T b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class iterator>
void output(iterator begin, iterator end, ostream &out = cerr) {
  while (begin != end) {
    out << (*begin) << " ";
    begin++;
  }
  out << endl;
}
template <class T>
void output(T x, ostream &out = cerr) {
  output(x.begin(), x.end(), out);
}
void fast_io() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
struct pt {
  long long x, y;
  pt() : x(0), y(0) {}
  pt(long long _x, long long _y) : x(_x), y(_y) {}
};
pt operator+(pt a, pt b) { return pt(a.x + b.x, a.y + b.y); }
pt operator-(pt a, pt b) { return pt(a.x - b.x, a.y - b.y); }
long long operator*(pt a, pt b) { return a.x * b.x + a.y * b.y; }
long long operator/(pt a, pt b) { return a.x * b.y - a.y * b.x; }
istream &operator>>(istream &is, pt &p) {
  is >> p.x >> p.y;
  return is;
}
ostream &operator<<(ostream &os, const pt &p) {
  os << p.x << " " << p.y;
  return os;
}
int half_plane(pt a) { return (a.y > 0 || (a.y == 0 && a.x > 0)) ^ 1; }
bool polar_cmp(pt a, pt b) {
  int ha = half_plane(a), hb = half_plane(b);
  if (ha < hb) {
    return 1;
  }
  if (ha > hb) {
    return 0;
  }
  return (a / b > 0);
}
bool ycmp(pt a, pt b) { return make_pair(a.y, b.x) < make_pair(b.y, b.x); }
int n;
vector<pt> a;
void rearrange() {
  int pos = min_element(a.begin(), a.end(), ycmp) - a.begin();
  rotate(a.begin(), a.begin() + pos, a.end());
}
void make_good() {
  rearrange();
  if (!polar_cmp(a.back() - a[0], a[1] - a[0])) {
    reverse(a.begin(), a.end());
    rearrange();
  }
}
int q, max_pos;
void read() {
  cin >> n >> q;
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  make_good();
  max_pos = max_element(a.begin(), a.end(), ycmp) - a.begin();
}
vector<pair<int, int> > events;
void build_events() {
  for (int i = 1; i <= max_pos; ++i) {
    events.emplace_back(a[i].y, 0);
  }
  for (int i = n - 1; i >= max_pos; --i) {
    events.emplace_back(a[i].y, 1);
  }
  sort(events.begin(), events.end());
}
const long double EPS = 1e-10;
struct event {
  long double x, a, b, c;
  int type, id;
};
bool operator<(const event &a, const event &b) { return (a.x < b.x); }
vector<event> E;
void increase(long double l, long double r, long double a, long double b,
              long double c) {
  E.push_back({l, a, b, c, 0, 0});
  E.push_back({r, -a, -b, -c, 0, 0});
}
void S_triangle(long double x1, long double x2, long double H1, long double H2,
                long double x, long double &a, long double &b, long double &c) {
  if (fabsl(x2 - x1) < EPS) {
    return;
  }
  if (x < x1) {
    return;
  }
  if (x > x2) {
    c += (x2 - x1) * (H1 + H2) / 2.0;
    return;
  }
  long double incl = (H2 - H1) / (x2 - x1);
  b += H1;
  c -= x1 * H1;
  a += incl / 2.0;
  b -= incl * x1;
  c += incl / 2.0 * x1 * x1;
}
void S_trapezoid(long double H, long double L1, long double R1, long double L2,
                 long double R2, long double x, long double &a, long double &b,
                 long double &c) {
  if (L1 > L2) {
    swap(L1, L2);
  }
  if (R1 > R2) {
    swap(R1, R2);
  }
  long double rect;
  if (x >= L1) {
    if (x <= R2) {
      b += H;
      c -= L1 * H;
    } else {
      c += (R2 - L1) * H;
    }
  }
  long double a1 = 0, b1 = 0, c1 = 0;
  S_triangle(L1, L2, H, 0, x, a1, b1, c1);
  S_triangle(R1, R2, 0, H, x, a1, b1, c1);
  a -= a1;
  b -= b1;
  c -= c1;
}
void fold_trapezoid(long double H, long double L1, long double R1,
                    long double L2, long double R2, long double x,
                    long double &a, long double &b, long double &c) {
  long double S = (R1 + R2 - L1 - L2) * H / 2.0;
  c += S;
  long double a1 = 0, b1 = 0, c1 = 0;
  S_trapezoid(H, L1, (L1 + R1) / 2.0, L2, (L2 + R2) / 2.0, x, a1, b1, c1);
  S_trapezoid(H, (L1 + R1) / 2.0, R1, (L2 + R2) / 2.0, R2, x, a, b, c);
  a -= a1;
  b -= b1;
  c -= c1;
}
const long double INF = 1e9;
void handle_trapezoid(long double y_min, long double y_max, long double L1,
                      long double R1, long double L2, long double R2) {
  long double H = y_max - y_min;
  vector<long double> x = {
      -INF, L1, R1, L2, R2, (L1 + R1) / 2.0, (L2 + R2) / 2.0, INF};
  sort(x.begin(), x.end());
  for (int i = 0; i < (int)x.size() - 1; ++i) {
    long double target_x = (x[i] + x[i + 1]) / 2.0;
    long double a = 0, b = 0, c = 0;
    fold_trapezoid(H, L1, R1, L2, R2, target_x, a, b, c);
    increase(x[i], x[i + 1], a, b, c);
  }
}
long double getX(pair<pt, pt> seg, long double y) {
  return (long double)seg.first.x +
         (long double)(seg.second.x - seg.first.x) *
             (y - (long double)seg.first.y) /
             (long double)(seg.second.y - seg.first.y);
}
void scanline() {
  int ptr_l = 0, ptr_r = 0;
  long double y = a[0].y;
  for (int i = 0; i < (int)events.size(); ++i) {
    long double y1 = events[i].first;
    pair<pt, pt> seg1 = {a[ptr_l], a[(ptr_l + 1) % n]};
    pair<pt, pt> seg2 = {a[ptr_r], a[(ptr_r - 1 + n) % n]};
    handle_trapezoid(y, y1, getX(seg1, y), getX(seg2, y), getX(seg1, y1),
                     getX(seg2, y1));
    y = y1;
    if (events[i].second == 0) {
      ptr_l = (ptr_l + 1) % n;
    } else {
      ptr_r = (ptr_r - 1 + n) % n;
    }
  }
}
void read_queries() {
  for (int i = 0; i < q; ++i) {
    long double x;
    cin >> x;
    E.push_back({x + EPS, 0, 0, 0, 1, i});
  }
}
const int mx = 1e5 + 228;
long double ans[mx];
void final_scanline() {
  long double a = 0, b = 0, c = 0;
  sort(E.begin(), E.end());
  for (auto e : E) {
    if (e.type == 0) {
      a += e.a;
      b += e.b;
      c += e.c;
    } else {
      long double x = e.x;
      ans[e.id] = a * x * x + b * x + c;
    }
  }
}
void print_ans() {
  cout << setprecision(10) << fixed;
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << '\n';
  }
}
signed main() {
  cerr << setprecision(4) << fixed;
  fast_io();
  read();
  build_events();
  scanline();
  read_queries();
  final_scanline();
  print_ans();
}
