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;
const int MAXN = 10005;
const long double PI = acos(-1.0);
const long double eps = 1e-15;
template <typename T>
inline void read(T &AKNOI) {
  T x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  AKNOI = flag * x;
}
int n, q;
long double sum[MAXN];
struct point {
  long double x, y;
  point() {}
  point(long double _x, long double _y) : x(_x), y(_y) {}
  inline void input() {
    int _x, _y;
    read(_x);
    read(_y);
    x = _x;
    y = _y;
  }
  friend point operator+(point a, point b) {
    return point(a.x + b.x, a.y + b.y);
  }
  friend point operator-(point a, point b) {
    return point(a.x - b.x, a.y - b.y);
  }
  friend point operator*(point a, long double b) {
    return point(a.x * b, a.y * b);
  }
  friend long double operator^(point a, point b) {
    return a.x * b.y - a.y * b.x;
  }
} p[MAXN], qp;
struct line {
  point u, v;
  line() {}
  line(point _u, point _v) : u(_u), v(_v) {}
};
inline point Intersect(line a, line b) {
  long double k = -((a.u - b.u) ^ (b.v - b.u)) / ((a.v - a.u) ^ (b.v - b.u));
  return a.u + (a.v - a.u) * k;
}
inline int Query(point d, bool x, bool y) {
  int L = 2, R = n, ret = 0;
  while (L <= R) {
    int M = (L + R) >> 1;
    if (((d ^ (p[M] - qp)) > 0) ^ x) {
      ret = M;
      if (y) {
        R = M - 1;
      } else {
        L = M + 1;
      }
    } else {
      if (((p[1] - qp) ^ (p[M] - qp)) > 0) {
        L = M + 1;
      } else {
        R = M - 1;
      }
    }
  }
  return ret;
}
long double Check(long double ang) {
  point d(cos(ang), sin(ang));
  int a, b, flag = ((d ^ (p[1] - qp)) > 0);
  a = Query(d, flag, 1);
  b = Query(d, flag, 0);
  long double ret = sum[b - 1] - sum[a - 1];
  point ia = Intersect(line(p[a], p[a - 1]), line(qp, qp + d));
  point ib = Intersect(line(p[b], p[b + 1]), line(qp, qp + d));
  ret += (ia ^ p[a]) + (p[b] ^ ib) + (ib ^ ia);
  ret = ret * 2 - sum[n];
  return flag ? ret : -ret;
}
void init() {
  read(n);
  read(q);
  for (int i = 1; i <= n; ++i) {
    p[i].input();
  }
  reverse(p + 1, p + n + 1);
  p[0] = p[n];
  p[n + 1] = p[1];
  for (int i = 1; i <= n; ++i) {
    sum[i] = sum[i - 1] + (p[i] ^ p[i + 1]);
  }
}
void solve() {
  while (q--) {
    qp.input();
    bool flag = (Check(0) < Check(PI));
    long double L = 0, R = PI - eps, M;
    while (R - L > eps) {
      M = (L + R) * 0.5;
      if (Check(M) >= 0) {
        (flag ? R : L) = M;
      } else {
        (flag ? L : R) = M;
      }
    }
    printf("%.15lf\n", (double)L);
  }
}
int main() {
  init();
  solve();
  return 0;
}