{"raw_statement":[{"iden":"problem statement","content":"The vertices of a convex $N$\\-gon $P$ in an $xy$\\-plane are given as $(x_1, y_1), (x_2, y_2), \\ldots, (x_N, y_N)$ in the **counterclockwise** order. (Here, the positive direction of the $x$\\-axis is right, and the positive direction of the $y$\\-axis is up.)\nBased on this polygon $P$, we consider $M$ convex $N$\\-gons $P_1, P_2, \\ldots, P_M$.  \nFor $i = 1, 2, \\ldots, M$, the polygon $P_i$ is obtained by shifting $P$ in the positive direction of the $x$\\-axis by $u_i$ and in the positive direction of the $y$\\-axis by $v_i$. In other words, $P_i$ is a convex $N$\\-gon whose vertices are $(x_1+u_i, y_1+v_i), (x_2+u_i, y_2+v_i), \\ldots, (x_N+u_i, y_N+v_i)$.\nFor each of $Q$ points $(a_1, b_1), (a_2, b_2), \\ldots, (a_Q, b_Q)$, determine if \"the point is contained in all of the $M$ polygons $P_1, P_2, \\ldots, P_M$.\"\nHere, we regard a point is also contained in a polygon if the point is on the polygon's boundary."},{"iden":"constraints","content":"*   $3 \\leq N \\leq 50$\n*   $1 \\leq M \\leq 2 \\times 10^5$\n*   $1 \\leq Q \\leq 2 \\times 10^5$\n*   $-10^8 \\leq x_i, y_i \\leq 10^8$\n*   $-10^8 \\leq u_i, v_i \\leq 10^8$\n*   $-10^8 \\leq a_i, b_i \\leq 10^8$\n*   All values in input are integers.\n*   $(x_1, y_1), (x_2, y_2), \\ldots, (x_N, y_N)$ forms a convex $N$\\-gon in the counterclockwise order.\n*   Each interior angle of the polygon $P$ is less than $180$ degrees."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$x_1$ $y_1$\n$x_2$ $y_2$\n$\\vdots$\n$x_N$ $y_N$\n$M$\n$u_1$ $v_1$\n$u_2$ $v_2$\n$\\vdots$\n$u_M$ $v_M$\n$Q$\n$a_1$ $b_1$\n$a_2$ $b_2$\n$\\vdots$\n$a_Q$ $b_Q$"},{"iden":"sample input 1","content":"5\n-2 -3\n0 -2\n1 0\n0 2\n-2 1\n2\n0 1\n1 0\n6\n0 0\n1 0\n0 1\n1 1\n-1 -1\n-1 -2"},{"iden":"sample output 1","content":"Yes\nNo\nYes\nYes\nYes\nNo\n\nPolygon $P$ is a pentagon ($5$\\-gon) whose vertices are $(-2, -3), (0, -2), (1, 0), (0, 2), (-2, 1)$.\n\n*   Polygon $P_1$ is a pentagon ($5$\\-gon) obtained by shifting $P$ in the positive direction of the $x$\\-axis by $0$ and in the positive direction of the $y$\\-axis by $1$, so its vertices are $(-2, -2), (0, -1), (1, 1), (0, 3), (-2, 2)$.\n*   Polygon $P_2$ is a pentagon ($5$\\-gon) obtained by shifting $P$ in the positive direction of the $x$\\-axis by $1$ and in the positive direction of the $y$\\-axis by $0$, so its vertices are $(-1, -3), (1, -2), (2, 0), (1, 2), (-1, 1)$.\n\nThus, the following $6$ lines should be printed.\n\n*   The $1$\\-st line should be `Yes` because $(a_1, b_1) = (0, 0)$ is contained in both $P_1$ and $P_2$.\n*   The $2$\\-nd line should be `No` because $(a_2, b_2) = (1, 0)$ is contained in $P_2$ but not in $P_1$.\n*   The $3$\\-rd line should be `Yes` because $(a_3, b_3) = (0, 1)$ is contained in both $P_1$ and $P_2$.\n*   The $4$\\-th line should be `Yes` because $(a_4, b_4) = (1, 1)$ is contained in both $P_1$ and $P_2$.\n*   The $5$\\-th line should be `Yes` because $(a_5, b_5) = (-1, -1)$ is contained in both $P_1$ and $P_2$.\n*   The $6$\\-th line should be `No` because $(a_6, b_6) = (-1, -2)$ is contained in $P_2$ but not in $P_1$.\n\nNote that a point on the boundary of a polygon is also considered to be contained in the polygon.\n![image](https://img.atcoder.jp/abc251/8216bd194340d2648ce000e9ac9a203e.png)"},{"iden":"sample input 2","content":"10\n45 100\n-60 98\n-95 62\n-95 28\n-78 -41\n-54 -92\n-8 -99\n87 -94\n98 23\n87 91\n5\n-57 -40\n-21 -67\n25 39\n-30 25\n39 -20\n16\n4 5\n-34 -8\n-63 53\n78 84\n19 -16\n64 9\n-13 7\n13 53\n-20 4\n2 -7\n3 18\n-12 10\n-69 -93\n2 9\n27 64\n-92 -100"},{"iden":"sample output 2","content":"Yes\nYes\nNo\nNo\nYes\nNo\nYes\nNo\nYes\nYes\nYes\nYes\nNo\nYes\nNo\nNo"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}