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;
inline long long rd() {
  long long x = 0;
  int ch = getchar(), f = 1;
  while (!isdigit(ch) && (ch != '-') && (ch != EOF)) ch = getchar();
  if (ch == '-') {
    f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void rt(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10)
    rt(x / 10), putchar(x % 10 + '0');
  else
    putchar(x + '0');
}
const double pi = acos(-1), eps = 1e-10;
const int maxn = 10005;
struct node {
  double x, y;
  node(double a = 0, double b = 0) { x = a, y = b; }
} a[maxn], q, unit;
node operator+(const node& a, const node& b) {
  return node(a.x + b.x, a.y + b.y);
}
node operator-(const node& a, const node& b) {
  return node(a.x - b.x, a.y - b.y);
}
double operator*(const node& a, const node& b) { return a.x * b.y - a.y * b.x; }
node operator*(const node& a, const double& b) {
  return node(a.x * b, a.y * b);
}
int n, qs;
double pre[maxn], suf[maxn], S;
void precalc() {
  node lst = a[2] - a[1], now;
  for (int i = int(3); i <= (int)(n); i++) {
    now = a[i] - a[1];
    pre[i] = pre[i - 1] + now * lst;
    lst = now;
  }
  lst = a[n] - a[1];
  for (int i = int(n - 1); i >= (int)(2); i--) {
    now = a[i] - a[1];
    suf[i] = suf[i + 1] + lst * now;
    lst = now;
  }
  S = pre[n];
}
node intersec(node a, node b, node c, node d) {
  double k = (c - a) * (d - c) / ((b - a) * (d - c));
  return a + (b - a) * k;
}
double check(double ang) {
  int rev = 0;
  if (node(cos(ang), sin(ang)) * (a[1] - q) < 0) rev = 1, ang -= pi;
  unit = node(cos(ang), sin(ang));
  int l = 2, r = n, L, R;
  while (l < r) {
    int mid = l + r >> 1;
    if (unit * (a[mid] - q) < 0)
      r = mid;
    else {
      if ((a[mid] - q) * (a[1] - q) >= 0)
        l = mid + 1;
      else
        r = mid - 1;
    }
  }
  L = l;
  r = n;
  while (l < r) {
    int mid = l + r + 1 >> 1;
    if (unit * (a[mid] - q) < 0)
      l = mid;
    else
      r = mid - 1;
  }
  R = l;
  node jl = intersec(q, q + unit, a[L], a[L - 1]),
       jr = intersec(q, q + unit, a[R % n + 1], a[R]);
  double area = pre[L - 1] + suf[R + 1];
  area += (jl - a[1]) * (a[L - 1] - a[1]);
  area += (a[R % n + 1] - a[1]) * (jr - a[1]);
  area += (jr - a[1]) * (jl - a[1]);
  area = area - (S - area);
  if (rev) area = -area, ang += pi;
  return area;
}
int main() {
  n = rd(), qs = rd();
  for (int i = int(1); i <= (int)(n); i++) a[i].x = rd(), a[i].y = rd();
  precalc();
  for (int i = int(1); i <= (int)(qs); i++) {
    q.x = rd(), q.y = rd();
    double l = 0, r = pi, neg = check(l);
    while (r - l > eps) {
      double mid = (l + r) / 2;
      if (check(mid) * neg >= 0)
        l = mid;
      else
        r = mid;
    }
    printf("%.20lf\n", l);
  }
}