Enclose Points
시간 제한5초메모리 제한512 MB
서로 교차하지 않는 선분 M개로 연결된 점 N개가 주어질 때, 각 질의 점을 둘러싸는 선분 사이클이 존재하는지 판정한다.
문제
There are points and segments on the -plane. Each segment connects two of these points and they don't intersect each other except at the endpoints. You are also given points as queries. Your task is to determine for each query point whether you can make a polygon that encloses the query point using some of the given segments. Note that the polygon should not necessarily be convex.
입력
Each input is formatted as follows.
$N$ $M$ $Q$
$x_1$ $y_1$
...
$x_N$ $y_N$
$a_1$ $b_1$
...
$a_M$ $b_M$
$qx_1$ $qy_1$
...
$qx_Q$ $qy_Q$
The first line contains three integers (), (), and (), which represent the number of points, the number of segments, and the number of queries, respectively. Each of the following lines contains two integers and (), the coordinates of the -th point. The points are guaranteed to be distinct, that is, when . Each of the following lines contains two integers and (), which indicate that the -th segment connects the -th point and the -th point. Assume that those segments do not intersect each other except at the endpoints. Each of the following lines contains two integers and (), the coordinates of the -th query point.
You can assume that, for any pair of query point and segment, the distance between them is at least .
출력
The output should contain lines. Print "Yes" on the -th line if there is a polygon that contains the -th query point. Otherwise print "No" on the -th line.