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;
bool debug = 0;
const long double eps = 1e-9;
struct pt {
  long double x, y;
  pt() {}
  pt(long double a, long double b) : x(a), y(b) {}
};
pt operator+(pt a, pt b) { return pt(a.x + b.x, a.y + b.y); }
pt operator-(pt a, pt b) { return pt(a.x - b.x, a.y - b.y); }
pt operator*(pt a, long double b) { return pt(a.x * b, a.y * b); }
pt operator/(pt a, long double b) {
  return pt((long double)a.x / b, (long double)a.y / b);
}
bool operator<(pt a, pt b) { return a.y < b.y || (a.y == b.y && a.x < b.x); }
long double cross(pt a, pt b) { return a.x * b.y - a.y * b.x; }
long double dot(pt a, pt b) { return a.x * b.x + a.y * b.y; }
long double sq(pt a) { return dot(a, a); }
long double abs(pt a) { return sqrt(sq(a)); }
struct line {
  pt p;
  long double c;
  line(pt a, pt b) : p(a - b), c(cross(p, a)) {}
};
long long sgn(long double x) { return abs(x) == 0 ? 0 : x > 0 ? 1 : -1; }
long double side(line l, pt a) { return l.c - cross(l.p, a); }
long long sside(line l, pt a) { return sgn(side(l, a)); }
pt sec(line a, line b) {
  return pt(-(b.c * a.p.x - a.c * b.p.x), a.c * b.p.y - b.c * a.p.y) /
         cross(a.p, b.p);
}
int Part(pt cen, pt b) { return b.y > cen.y || (b.y == cen.y && b.x > cen.x); }
const int N = 20050;
const long double PI = acos(-1);
pt hull[N];
long double sum[N];
set<pair<pt, int> > st;
long double Solve(long double mid, pt cen, int n) {
  pt fcen = pt(cen.x, cen.y);
  pt gcen = fcen + pt(cos(mid), sin(mid));
  line ln = line(fcen, gcen);
  int add = 0;
  if (side(ln, hull[1]) <= eps) add = 1;
  int lo = 2, hi = n, mi, r = 1, l = 1;
  while (lo <= hi) {
    mi = lo + hi >> 1;
    if (cross(hull[1] - hull[mi], cen - hull[mi]) >= 0)
      r = mi, lo = mi + 1;
    else
      hi = mi - 1;
  }
  int p1 = n;
  lo = l, hi = r;
  long long mul = sside(ln, hull[l]);
  while (lo <= hi) {
    mi = lo + hi >> 1;
    if (sside(ln, hull[mi]) == mul)
      p1 = mi, lo = mi + 1;
    else
      hi = mi - 1;
  }
  int p2 = r;
  lo = r + 1, hi = n;
  mul = sside(ln, hull[r + 1]);
  while (lo <= hi) {
    mi = lo + hi >> 1;
    if (sside(ln, hull[mi]) == mul)
      p2 = mi, lo = mi + 1;
    else
      hi = mi - 1;
  }
  if (sside(ln, hull[r + 1]) == sside(ln, hull[l])) p2 = r;
  if (sside(ln, hull[l]) == 0) p1 = l, p2 = r;
  if (p1 > p2) swap(p1, p2);
  long double Area1 = 0, Area2 = 0;
  line l1 = line(hull[p1], hull[p1 + 1]), l2 = line(hull[p2], hull[p2 + 1]);
  pt sec1 = sec(ln, l1), sec2 = sec(ln, l2);
  if (debug) {
    cout << "l1:(" << l1.p.x << " " << l1.p.y << " " << l1.c << "\n";
    cout << "l2:(" << l2.p.x << " " << l2.p.y << " " << l2.c << "\n";
    cout << "ln:(" << ln.p.x << " " << ln.p.y << " " << ln.c << "\n";
  }
  Area1 = sum[p2 - 1] - sum[p1] + cross(sec1, hull[p1 + 1]) +
          cross(hull[p2], sec2) + cross(sec2, sec1);
  Area2 = sum[p1 + n - 1] - sum[p2] + cross(sec2, hull[p2 + 1]) +
          cross(hull[p1 + n], sec1) + cross(sec1, sec2);
  Area1 = abs(Area1);
  Area2 = abs(Area2);
  if (debug)
    cout << "mid:" << mid << " p1:" << p1 << " p2:" << p2 << "\n"
         << "(" << sec1.x << " " << sec1.y << ") (" << sec2.x << " " << sec2.y
         << ")\n";
  if (debug) cout << "Area1:" << Area1 << " Area2:" << Area2 << "\n";
  if (debug) cout << "l:" << l << " r:" << r << "\n";
  int id = rand() % n + 1;
  while (abs(side(ln, hull[id])) < eps) id = rand() % n + 1;
  if ((side(ln, hull[id]) < 0 && id > p1 && id <= p2) ||
      (side(ln, hull[id]) > 0 && !(id > p1 && id <= p2)))
    swap(Area1, Area2);
  return Area1 - Area2;
}
int main() {
  srand(time(0));
  int n, q, i, x, y;
  scanf("%i %i", &n, &q);
  for (i = 1; i <= n; i++)
    scanf("%i %i", &x, &y), hull[i] = pt(x, y), hull[i + n] = hull[i],
                            st.insert(make_pair(hull[i], i));
  hull[n * 2 + 1] = hull[1];
  for (i = 1; i <= n * 2; i++)
    sum[i] = sum[i - 1] + cross(hull[i], hull[i + 1]);
  cout << fixed << setprecision(12);
  while (q--) {
    pt cen;
    scanf("%i %i", &x, &y);
    cen = pt(x, y);
    long double top = PI, bot = 0, mid;
    bool mod = 0;
    if (Solve(0, cen, n) < 0) mod = 1;
    for (int work = 0; work < 40; work++) {
      mid = (top + bot) / 2;
      long double f = Solve(mid, cen, n);
      if ((!mod && f < 0) || (mod && f > 0))
        top = mid;
      else
        bot = mid;
    }
    cout << min((top + bot) / 2, PI - 1e-10) << "\n";
    debug = 0;
  }
  return 0;
}