Problem: Arkady reached the n-th level in Township game, so Masha decided to bake a pie for him! Of course, the pie has a shape of convex n-gon, i.e. a polygon with n vertices.

Arkady decided to cut the pie in two equal in area parts by cutting it by a straight line, so that he can eat one of them and give the other to Masha. There is a difficulty because Arkady has already put a knife at some point of the pie, so he now has to cut the pie by a straight line passing trough this point.

Help Arkady: find a line that passes through the point Arkady has put a knife into and cuts the pie into two parts of equal area, or determine that it's impossible. Your program has to quickly answer many queries with the same pie, but different points in which Arkady puts a knife.

Input

The first line contains two integers n and q (3 ≤ n ≤ 104, 1 ≤ q ≤ 105) — the number of vertices in the pie and the number of queries.

n line follow describing the polygon vertices in clockwise order. The i-th of these line contains two integers xi and yi ( - 106 ≤ xi, yi ≤ 106) — the coordinates of the i-th vertex. It is guaranteed that the polygon is strictly convex, in particular, no three vertices line on the same line.

An empty line follows.

q lines follow describing the query points. The i-th of these lines contain two integers xi and yi ( - 106 ≤ xi, yi ≤ 106) — the coordinates of the point in which Arkady puts the knife in the i-th query. In is guaranteed that in each query the given point is strictly inside the polygon, in particular, is not on its edges.

Output

For each query print single integer — the polar angle of the line that is the answer for the corresponding query, in radians. The angle should be in the segment [0;π], the angles are measured from the direction of OX axis in counter-clockwise order. For example, the polar angle of the OY axis is <image>. If there is no answer in that query, print -1.

If there are several answers, print any of them. Your answer is considered correct if the difference between the areas of the parts divided by the total area of the polygon doesn't exceed 10 - 4 by absolute value. In other words, if a and b are the areas of the parts after the cut, then your answer is correct if and only of <image>.

Examples

Input

3 1
0 0
0 3
3 0

1 1


Output

2.67794504460098710000


Input

5 3
6 5
6 3
5 0
0 0
0 5

5 4
3 3
5 2


Output

0.60228734612690049000
1.27933953226473580000
2.85805511179015910000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using DO = long double;
const DO pi = acosl(-1);
const DO eps = 1e-9;
int sgn(const DO& a) {
  if (a < -eps) return -1;
  return a > eps;
}
struct point {
  DO first, second;
  point(DO first = 0, DO second = 0) : first(first), second(second) {}
  point operator+(const point& a) const {
    return {first + a.first, second + a.second};
  }
  point operator-(const point& a) const {
    return {first - a.first, second - a.second};
  }
  point operator&(const point& a) const {
    return {first * a.first - second * a.second,
            first * a.second + second * a.first};
  }
  point operator*(const DO& a) const { return {first * a, second * a}; }
  point operator/(const DO& a) const { return {first / a, second / a}; }
  DO operator*(const point& a) const {
    return first * a.first + second * a.second;
  }
  DO operator^(const point& a) const {
    return first * a.second - second * a.first;
  }
  bool operator<(const point& a) const {
    int t;
    t = sgn(first - a.first);
    if (t) return t < 0;
    return second < a.second;
  }
  bool operator>(const point& a) const {
    int t;
    t = sgn(first - a.first);
    if (t) return t > 0;
    return second > a.second;
  }
  bool operator==(const point& a) const {
    return sgn(first - a.first) == 0 && sgn(second - a.second) == 0;
  }
  bool operator!=(const point& a) const {
    return sgn(first - a.first) || sgn(second - a.second);
  }
  point rotate(DO a) { return *this & point(cosl(a), sinl(a)); }
  point conj() { return {-second, first}; }
  DO len() { return sqrtl(first * first + second * second); }
  point norm() {
    DO l = len();
    if (l < eps) return *this;
    return {first / l, second / l};
  }
  DO alp() { return atan2l(second, first); }
  void eat() { cin >> first >> second; }
  void bat() const { cout << first << ' ' << second << endl; }
};
point get(const DO& alp) { return point(cosl(alp), sinl(alp)); }
const int N = 1e4 + 10;
point p[N * 4], a;
int n;
DO area, dp[N * 4];
int id(const point& b) {
  if (sgn(p[0] - a ^ b) > 0) return 0;
  if (sgn(p[0] - a ^ b) == 0) {
    if (sgn(p[1] - a ^ b) > 0) return 1;
    return n - 1;
  }
  int st = 0, ed = n, i;
  while (true) {
    i = st + ed >> 1;
    int sg = sgn(p[i] - a ^ b);
    if (sg > 0) return i;
    if (sg == 0) {
      if (sgn(p[i - 1] - a ^ b) > 0)
        return i - 1;
      else
        return (i + 1) % n;
    }
    if (sgn(p[0] - a ^ p[i] - a) > 0)
      st = i;
    else
      ed = i;
  }
}
int get(int L, int R, const point& b) {
  if (R < L) R += n;
  while (L + 1 < R) {
    int md = L + R >> 1;
    if (sgn(p[md] - a ^ b) > 0)
      L = md;
    else
      R = md;
  }
  return L % n;
}
point inter(const point& a, const point& b, const point& c, const point& d) {
  return a + b * ((c - a ^ d) / (b ^ d));
}
DO seg(int L, int R) {
  if (L == R) return 0;
  while (L > R) R += n;
  return dp[R] - dp[L];
}
DO calc(const DO& alp) {
  point b = get(alp), c;
  c = b * -1;
  int L = id(b);
  int R = id(c);
  int j = get(L, R, b);
  int i = get(R, L, c);
  point F = inter(p[i], p[i + 1] - p[i], a, c);
  point G = inter(p[j], p[j + 1] - p[j], a, b);
  DO ans = G ^ F;
  ans += F ^ p[i + 1];
  ans += seg((i + 1) % n, j);
  ans += p[j] ^ G;
  return ans;
}
bool ok(const DO& a) { return (fabsl(a - area) / area) < 1e-7; }
DO solve() {
  a.eat();
  DO st = 0, ed = pi, md;
  DO sub = calc(st);
  if (ok(sub)) return 0;
  int t = sgn(area - sub);
  int step = 40;
  while (step--) {
    md = (st + ed) / 2;
    sub = calc(md);
    if (ok(sub)) return md;
    if (sgn(area - sub) == t)
      st = md;
    else
      ed = md;
  }
  return st;
}
int main() {
  int q;
  scanf("%d %d", &n, &q);
  for (int i = 0; i < n; i++)
    p[i].eat(), p[n + i] = p[n + n + i] = p[n + n + n + i] = p[i];
  reverse(p, p + n * 4);
  for (int i = 0; i < n; i++) area += p[i] ^ p[i + 1];
  area /= 2;
  for (int i = 1; i < n * 4; i++) dp[i] = dp[i - 1] + (p[i - 1] ^ p[i]);
  while (q--) printf("%.12lf\n", (double)solve());
  return 0;
}