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;
using ll = long long;
template <class t, class u>
void chmax(t& first, u second) {
  if (first < second) first = second;
}
template <class t, class u>
void chmin(t& first, u second) {
  if (second < first) first = second;
}
template <class t>
using vc = vector<t>;
template <class t>
using vvc = vc<vc<t>>;
using pi = pair<ll, ll>;
using vi = vc<ll>;
template <class t, class u>
ostream& operator<<(ostream& os, const pair<t, u>& p) {
  return os << "{" << p.first << "," << p.second << "}";
}
template <class t>
ostream& operator<<(ostream& os, const vc<t>& v) {
  os << "{";
  for (auto e : v) os << e << ",";
  return os << "}";
}
using uint = unsigned;
using ull = unsigned long long;
template <class t, size_t n>
ostream& operator<<(ostream& os, const array<t, n>& first) {
  return os << vc<t>(first.begin(), first.end());
}
template <ll i, class T>
void print_tuple(ostream&, const T&) {}
template <ll i, class T, class H, class... Args>
void print_tuple(ostream& os, const T& t) {
  if (i) os << ",";
  os << get<i>(t);
  print_tuple<i + 1, T, Args...>(os, t);
}
template <class... Args>
ostream& operator<<(ostream& os, const tuple<Args...>& t) {
  os << "{";
  print_tuple<0, tuple<Args...>, Args...>(os, t);
  return os << "}";
}
template <class t>
void print(t x, ll suc = 1) {
  cout << x;
  if (suc == 1) cout << "\n";
  if (suc == 2) cout << " ";
}
ll read() {
  ll i;
  cin >> i;
  return i;
}
vi readvi(ll n, ll off = 0) {
  vi v(n);
  for (ll i = ll(0); i < ll(n); i++) v[i] = read() + off;
  return v;
}
template <class T>
void print(const vector<T>& v, ll suc = 1) {
  for (ll i = ll(0); i < ll(v.size()); i++)
    print(v[i], i == ll(v.size()) - 1 ? suc : 2);
}
string readString() {
  string s;
  cin >> s;
  return s;
}
template <class T>
T sq(const T& t) {
  return t * t;
}
void yes(bool ex = true) {
  cout << "Yes"
       << "\n";
  if (ex) exit(0);
}
void no(bool ex = true) {
  cout << "No"
       << "\n";
  if (ex) exit(0);
}
void possible(bool ex = true) {
  cout << "Possible"
       << "\n";
  if (ex) exit(0);
}
void impossible(bool ex = true) {
  cout << "Impossible"
       << "\n";
  if (ex) exit(0);
}
constexpr ll ten(ll n) { return n == 0 ? 1 : ten(n - 1) * 10; }
const ll infLL = LLONG_MAX / 3;
const ll inf = infLL;
ll topbit(signed t) { return t == 0 ? -1 : 31 - __builtin_clz(t); }
ll topbit(ll t) { return t == 0 ? -1 : 63 - __builtin_clzll(t); }
ll botbit(signed first) { return first == 0 ? 32 : __builtin_ctz(first); }
ll botbit(ll first) { return first == 0 ? 64 : __builtin_ctzll(first); }
ll popcount(signed t) { return __builtin_popcount(t); }
ll popcount(ll t) { return __builtin_popcountll(t); }
bool ispow2(ll i) { return i && (i & -i) == i; }
ll mask(ll i) { return (ll(1) << i) - 1; }
bool inc(ll first, ll second, ll c) { return first <= second && second <= c; }
template <class t>
void mkuni(vc<t>& v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
}
ll rand_int(ll l, ll r) {
  static mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
  return uniform_int_distribution<ll>(l, r)(gen);
}
template <class t>
void myshuffle(vc<t>& first) {
  for (ll i = ll(0); i < ll(ll(first.size())); i++)
    swap(first[i], first[rand_int(0, i)]);
}
template <class t>
ll lwb(const vc<t>& v, const t& first) {
  return lower_bound(v.begin(), v.end(), first) - v.begin();
}
using ld = long double;
ld eval(const vc<ld>& f, ld x) {
  ld first = 0;
  for (ll i = ll(ll(f.size())) - 1; i >= ll(0); i--) {
    first *= x;
    first += f[i];
  }
  return first;
}
ld err(ld first, ld second) {
  return abs(first - second) / max({ld(1), abs(first), abs(second)});
}
vc<ld> interpolate_f(vc<ld> x, vc<ld> y) {
  ll n = ll(x.size()), raw = n;
  assert(ll(y.size()) == n);
  {
    assert(is_sorted(x.begin(), x.end()));
    ll m = 0;
    for (ll i = ll(0); i < ll(n); i++) {
      if (m && err(x[m - 1], x[i]) <= 1e-6) continue;
      x[m] = x[i];
      y[m] = y[i];
      m++;
    }
    n = m;
    x.resize(m);
    y.resize(m);
  }
  vc<ld> res(n);
  vc<ld> cur(n + 1);
  cur[0] = 1;
  for (ll i = ll(0); i < ll(n); i++) {
    for (ll j = ll(i + 1) - 1; j >= ll(0); j--) {
      cur[j + 1] += cur[j];
      cur[j] *= -x[i];
    }
  }
  vc<ld> tmp(n);
  for (ll i = ll(0); i < ll(n); i++) {
    ld pre = 0;
    for (ll j = ll(n) - 1; j >= ll(0); j--)
      pre = tmp[j] = cur[j + 1] + pre * x[i];
    ld w = y[i] / eval(tmp, x[i]);
    for (ll j = ll(0); j < ll(n); j++) res[j] += tmp[j] * w;
  }
  res.resize(raw);
  return res;
}
using ld = long double;
using cm = complex<ld>;
const ld eps = 1e-8;
const ld PI = acos(ld(-1));
ll sgn(ld first) { return first < -eps ? -1 : (first > eps ? 1 : 0); }
ld rabs(cm first) { return max(abs(first.real()), abs(first.imag())); }
ld signed_rabs(cm first) {
  if (abs(first.real()) > abs(first.imag()))
    return first.real();
  else
    return first.imag();
}
ld dot(cm first, cm second) {
  return first.real() * second.real() + first.imag() * second.imag();
}
ld crs(cm first, cm second) {
  return first.real() * second.imag() - first.imag() * second.real();
}
ld crs(cm first, cm second, cm c) { return crs(second - first, c - first); }
ll ccw(cm first, cm second) { return sgn(crs(first, second)); }
ll ccw(cm first, cm second, cm c) { return ccw(second - first, c - first); }
auto cmless = [](cm first, cm second) {
  ll s = sgn(first.real() - second.real());
  if (s)
    return s < 0;
  else
    return sgn(first.imag() - second.imag()) < 0;
};
bool cmeq(cm first, cm second) {
  return sgn(first.real() - second.real()) == 0 &&
         sgn(first.imag() - second.imag()) == 0;
};
ll argtype(cm first) {
  if (sgn(first.imag()) == 0) return first.real() < 0 ? 1 : 0;
  return first.imag() < 0 ? 0 : 1;
}
ll argcmp(cm first, cm second) {
  ll at = argtype(first), bt = argtype(second);
  if (at != bt) return at < bt ? -1 : 1;
  return -ccw(first, second);
};
bool argless(cm first, cm second) { return argcmp(first, second) < 0; }
ll bet(cm first, cm second, cm c) {
  cm d = second - first;
  ld e = dot(d, c - first);
  if (sgn(e) <= 0) return sgn(e) - 1;
  return sgn(e - norm(d)) + 1;
}
ll cont(cm first, cm second, cm c, cm d) {
  if (ccw(first, second, c) == -1) swap(second, c);
  return min({ccw(first, second, d), ccw(second, c, d), ccw(c, first, d)}) + 1;
}
ll qeq(ld first, ld second, ld c, ld& d, ld& e) {
  ld f = second * second - 4 * first * c;
  if (sgn(f) < 0) return 0;
  ld g = sqrt(max(f, ld(0)));
  d = (-second + g) / (2 * first);
  e = (-second - g) / (2 * first);
  return sgn(f) + 1;
}
ld arg(ld first, ld second, ld c) {
  return acos(
      min(max((first * first + second * second - c * c) / (2 * first * second),
              ld(-1)),
          ld(1)));
}
ld turn(cm first, cm second, cm c) {
  return arg((c - second) / (second - first));
}
cm rot90(cm first) { return cm(-first.imag(), first.real()); }
using ln = pair<cm, cm>;
cm dir(ln first) { return first.second - first.first; }
cm eval(ln first, ld second) { return first.first + dir(first) * second; }
ll bet(ln first, cm second) { return bet(first.first, first.second, second); }
ll ccw(ln first, cm second) { return ccw(first.first, first.second, second); }
cm proj(ln first, cm second) {
  cm c = dir(first);
  return first.first + c * dot(c, second - first.first) / norm(c);
}
cm refl(ln first, cm second) { return ld(2) * proj(first, second) - second; }
ld dsp(ln first, cm second) {
  cm c = proj(first, second);
  if (abs(bet(first.first, first.second, c)) <= 1) return abs(second - c);
  return min(abs(second - first.first), abs(second - first.second));
}
ll iss(ln first, ln second) {
  ll c1 = ccw(first.first, first.second, second.first),
     c2 = ccw(first.first, first.second, second.second);
  ll d1 = ccw(second.first, second.second, first.first),
     d2 = ccw(second.first, second.second, first.second);
  if (c1 || c2 || d1 || d2) return 1 - max(c1 * c2, d1 * d2);
  ll f = bet(first.first, first.second, second.first),
     g = bet(first.first, first.second, second.second);
  if (max(f, g) == -2 || min(f, g) == 2) return 0;
  if (max(f, g) == -1 || min(f, g) == 1) return 1;
  return 3;
}
cm cll(ln first, ln second) {
  return eval(first, crs(second.first, second.second, first.first) /
                         crs(dir(first), dir(second)));
}
ld dss(ln first, ln second) {
  if (iss(first, second)) return 0;
  return min({dsp(first, second.first), dsp(first, second.second),
              dsp(second, first.first), dsp(second, first.second)});
}
ln vbis(cm first, cm second) {
  cm c = (first + second) * ld(0.5), d = second - first;
  return ln(c, cm(c.real() - d.imag(), c.imag() + d.real()));
}
bool ips(const vc<cm>& first, ln second) {
  ll n = first.size();
  for (ll i = ll(0); i < ll(n); i++) {
    cm c = first[(i + n - 1) % n], d = first[i], e = first[(i + 1) % n];
    if (iss(ln(c, d), second) == 2) return 1;
    if (ccw(second, d) == 0 && bet(second.first, second.second, d) == 0) {
      if (ccw(c, d, e) == 1) return 1;
      if (ccw(second, c) * ccw(second, e) < 0) return 1;
    }
  }
  return 0;
}
ll cont(const vc<cm>& first, cm second) {
  ll n = first.size();
  ll res = 0;
  for (ll i = ll(0); i < ll(n); i++) {
    cm c = first[i], d = first[(i + 1) % n];
    if (ccw(c, d, second) == 0 && abs(bet(c, d, second)) <= 1) return 1;
    if (c.imag() > d.imag()) swap(c, d);
    if (sgn(second.imag() - c.imag()) > 0 &&
        sgn(d.imag() - second.imag()) >= 0 && ccw(c, d, second) == 1)
      res ^= 1;
  }
  return res * 2;
}
ld area2(const vc<cm>& first) {
  ll n = first.size();
  ld second = 0;
  for (ll i = ll(0); i < ll(n); i++)
    second += crs(first[i], first[(i + 1) % n]);
  return second;
}
vc<cm> convex(vc<cm> s, bool onedge) {
  swap(s[0], *min_element(s.begin(), s.end(), cmless));
  sort(s.begin() + 1, s.end(), [&](cm first, cm second) {
    ll c = ccw(s[0], first, second);
    if (c)
      return c == 1;
    else {
      if (onedge && sgn(s[0].real() - first.real()) == 0)
        return first.imag() > second.imag();
      return bet(s[0], first, second) == 2;
    }
  });
  vc<cm> t;
  for (ll i = ll(0); i < ll(s.size()); i++) {
    ll ss;
    while ((ss = t.size()) >= 2) {
      cm first = t[ss - 2];
      cm second = t[ss - 1];
      cm c = s[i];
      if (ccw(first, second, c) >= (onedge ? 0 : 1)) break;
      t.pop_back();
    }
    t.push_back(s[i]);
  }
  return t;
}
vc<cm> halfpint(vc<ln> s) {
  sort(s.begin(), s.end(), [&](ln first, ln second) {
    ll c = argcmp(dir(first), dir(second));
    if (c) return c < 0;
    return ccw(second, first.first) > 0;
  });
  s.erase(unique(s.begin(), s.end(),
                 [&](ln first, ln second) {
                   return argcmp(dir(first), dir(second)) == 0;
                 }),
          s.end());
  ll n = s.size();
  vi cur;
  for (ll ii = ll(0); ii < ll(n * 2); ii++) {
    ll i = ii % n, m;
    while ((m = cur.size()) >= 2) {
      if (ccw(s[i], cll(s[cur[m - 2]], s[cur[m - 1]])) > 0) break;
      cur.pop_back();
    }
    cur.push_back(i);
  }
  vi cnt(n);
  for (auto i : cur) cnt[i]++;
  vc<ln> t;
  for (ll i = ll(0); i < ll(n); i++)
    if (cnt[i] == 2) t.push_back(s[i]);
  ll m = t.size();
  vc<cm> res(m);
  for (ll i = ll(0); i < ll(m); i++) res[i] = (cll(t[i], t[(i + 1) % m]));
  return res;
}
vc<cm> ccut(vc<cm> first, ln second) {
  ll n = first.size();
  vc<cm> c;
  for (ll i = ll(0); i < ll(n); i++) {
    ll j = (i + 1) % n;
    ll d = ccw(second, first[i]), e = ccw(second, first[j]);
    if (d >= 0) c.push_back(first[i]);
    if (d * e < 0) c.push_back(cll(second, ln(first[i], first[j])));
  }
  return c;
}
ld intp2(ld first, ld second, ld c, ld d, ld p) {
  return (second * (c - p) + d * (p - first)) / (c - first);
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(20);
  cerr << fixed << setprecision(20);
  ll n, q;
  cin >> n >> q;
  vc<cm> ps;
  for (ll i = ll(0); i < ll(n); i++) {
    ll first, second;
    cin >> first >> second;
    ps.emplace_back(first, second);
  }
  ld sum = area2(ps) / 2;
  if (sum < 0) {
    sum *= -1;
    reverse(ps.begin(), ps.end());
  }
  vc<ld> ys;
  for (auto p : ps) ys.push_back(p.imag());
  mkuni(ys);
  ll s = ll(ys.size());
  vc<array<cm, 4>> trap(s);
  for (ll idx = ll(0); idx < ll(n); idx++) {
    cm first = ps[idx], second = ps[(idx + 1) % n];
    ll i = lwb(ys, first.imag());
    ll j = lwb(ys, second.imag());
    if (i > j) {
      for (ll k = ll(j); k < ll(i); k++) {
        trap[k][0] = cm(intp2(first.imag(), first.real(), second.imag(),
                              second.real(), ys[k + 1]),
                        ys[k + 1]);
        trap[k][1] = cm(intp2(first.imag(), first.real(), second.imag(),
                              second.real(), ys[k]),
                        ys[k]);
      }
    } else {
      for (ll k = ll(i); k < ll(j); k++) {
        trap[k][2] = cm(intp2(first.imag(), first.real(), second.imag(),
                              second.real(), ys[k]),
                        ys[k]);
        trap[k][3] = cm(intp2(first.imag(), first.real(), second.imag(),
                              second.real(), ys[k + 1]),
                        ys[k + 1]);
      }
    }
  }
  vc<pair<ld, array<ld, 3>>> ads;
  for (ll idx = ll(0); idx < ll(s); idx++) {
    vc<cm> first(trap[idx].begin(), trap[idx].end()), second = first;
    reverse(second.begin(), second.end());
    for (auto& p : second) p = cm(-p.real(), p.imag());
    auto shiftarea = [&](ld w) {
      auto c = first;
      for (ll i = ll(0); i < ll(4); i++) {
        c = ccut(c, ln(cm(second[i].real() + w, second[i].imag()),
                       cm(second[(i + 1) % 4].real() + w,
                          second[(i + 1) % 4].imag())));
      }
      return area2(c) / 2;
    };
    vc<ld> ws;
    for (ll i = ll(0); i < ll(4); i++)
      for (ll j = ll(0); j < ll(4); j++)
        ws.push_back(first[i].real() - second[j].real());
    mkuni(ws);
    ld c = 0;
    array<ld, 3> pre{};
    for (ll i = ll(0); i < ll(ll(ws.size()) - 1); i++) {
      ld f = ws[i], h = ws[i + 1];
      ld g = (f + h) / 2;
      ld d = shiftarea(g);
      ld e = shiftarea(h);
      auto poly = interpolate_f({f, g, h}, {c, d, e});
      array<ld, 3> sub;
      for (ll j = ll(0); j < ll(3); j++) {
        sub[j] = poly[j] - pre[j];
        pre[j] = poly[j];
      }
      ads.emplace_back(ws[i], sub);
      c = e;
    }
    assert(sgn(c) == 0);
    for (ll j = ll(0); j < ll(3); j++) pre[j] = -pre[j];
    ads.emplace_back(ws.back(), pre);
  }
  vc<ld> xs;
  for (auto kv : ads) xs.push_back(kv.first);
  mkuni(xs);
  ll len = ll(xs.size());
  vc<vc<ld>> f(len, vc<ld>(3));
  for (auto kv : ads) {
    ll i = lwb(xs, kv.first);
    for (ll j = ll(0); j < ll(3); j++) f[i][j] += kv.second[j];
  }
  for (ll i = ll(0); i < ll(len - 1); i++) {
    for (ll j = ll(0); j < ll(3); j++) f[i + 1][j] += f[i][j];
  }
  for (ll _ = ll(0); _ < ll(q); _++) {
    ld v;
    cin >> v;
    v *= 2;
    ll i = lwb(xs, v);
    i--;
    if (i < 0) i = 0;
    assert(i < len);
    ld common = eval(f[i], v);
    cout << sum - common / 2 << "\n";
  }
}
