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 long double pi = acos(-1);
struct point_t {
  long double x, y;
  point_t(long double x = 0, long double y = 0) : x(x), y(y) {}
  point_t operator+(const point_t &b) const {
    return point_t(x + b.x, y + b.y);
  }
  point_t operator-(const point_t &b) const {
    return point_t(x - b.x, y - b.y);
  }
  point_t operator*(const long double &b) const {
    return point_t(x * b, y * b);
  }
  point_t operator/(const long double &b) const {
    return point_t(x / b, y / b);
  }
  long double operator*(const point_t &b) const { return x * b.y - y * b.x; }
};
point_t intersect(point_t p0, point_t v0, point_t p1, point_t v1) {
  return p0 + v0 * ((p1 - p0) * v1 / (v0 * v1));
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<point_t> p(n);
  for (int i = 0; i < n; ++i) {
    cin >> p[i].x >> p[i].y;
  }
  reverse(p.begin(), p.end());
  p.push_back(p[0]);
  vector<long double> sum(n + 1);
  for (int i = 0; i < n; ++i) {
    sum[i + 1] = sum[i] + p[i] * p[i + 1];
  }
  while (m--) {
    point_t q;
    cin >> q.x >> q.y;
    auto check = [&](long double angle) {
      point_t v(cos(angle), sin(angle));
      int left, right;
      auto query = [&](bool sign, bool left) {
        int l = 1, r = n - 1, result = -1;
        while (l <= r) {
          int mid = l + r >> 1;
          if ((v * (p[mid] - q) <= 0) == sign) {
            result = mid;
            if (left) {
              r = mid - 1;
            } else {
              l = mid + 1;
            }
          } else {
            if ((p[0] - q) * (p[mid] - q) > 0) {
              l = mid + 1;
            } else {
              r = mid - 1;
            }
          }
        }
        return result;
      };
      if (v * (p[0] - q) > 0) {
        left = query(true, true);
        right = query(true, false);
      } else {
        left = query(false, true);
        right = query(false, false);
      }
      long double area = sum[right] - sum[left];
      point_t x = intersect(q, v, p[left - 1], p[left] - p[left - 1]);
      point_t y = intersect(q, v, p[right], p[right + 1] - p[right]);
      area += x * p[left];
      area += p[right] * y;
      area += y * x;
      if (v * (p[0] - q) > 0) {
        return area * 2 - sum[n];
      } else {
        return sum[n] - area * 2;
      }
    };
    bool sign = check(0) < check(pi);
    long double l = 0, r = pi;
    for (int tt = 0; tt < 50; ++tt) {
      long double mid = (l + r) / 2;
      if ((check(mid) >= 0) == sign) {
        r = mid;
      } else {
        l = mid;
      }
    }
    printf("%.20lf\n", (double)l);
  }
  return 0;
}