A very popular social network has developed a wonderful tool called “Are you ok?” to check the safety of its users when a catastrophe occurs. The tool is very simple: When a catastrophe occurs, the social network builds a map of the affected area and send a notification to the Mobile’s phones of all of the users who are in the area, doing just one simple question: Are you ok? Unfortunately, a couple of days ago the tool failed. After a big emergency in Grebulonia a lot of users of the social network in Logombia received this notification message, but what’s the problem? The problem is that Logonia is in the other side of the world, far far away of Grebulonia. The social network doesn’t want this happens again so they hired you to do the following task: After each emergency situation they will give you a map of the affected area (represented as a polygon formed by a list of consecutive vertices in the Cartesian coordinate system) and the location of the users. You must check how many users are in the affected area and should receive the notification (excluding those who are in the border of the map). Input The input starts with an integer t, the number of test cases. Each case is formed by multiple lines: The first line contains two integers a and b (3 ≤ a ≤ 500, 1 ≤ b ≤ 1000), the number of vertices in the map and the number of users. This line is followed by a lines each one with two integers xi and yi, denoting the vertices of the map (Vertices are given in clockwise order). Finally, there are b lines, each one with two integers xi and yi denoting the location of each user. (−1000000 ≤ x, y ≤ 1000000.) Output Print one line per test case, the number of users that must receive the “Are you ok?” notification. Sample Input 1 11 6 -1 2 10 32 41 63 65 56 34 14 05 -2 4 54 43 35 23 05 -2 5
2/2 Sample Output 3