Theater
In the theater, a grand play is being prepared, consisting of two acts where lighting plays a crucial role. The stage is shaped like a convex polygon, defined by its vertices in a Cartesian coordinate system. Above the stage, there is a spotlight that can move freely. When positioned at a certain point, the spotlight illuminates a circular area centered at that point with a radius of R.
In the first act, square carpets of size H×H are placed on the stage, with their sides parallel to the coordinate axes. These carpets may extend partially beyond the stage boundaries. Consider the area consisting of all points where the spotlight does not illuminate any of the carpets and does not illuminate the area outside the stage. Denote this area as S_1.
Before the second act, the carpets are removed from the stage. Now, consider the area consisting of all points where the spotlight does not illuminate the area outside the stage. Denote this area as S_2.
Given the input data, which describes the stage and the placement of carpets on it during the first act, determine the areas S_1 and S_2 as described above.
Input
The first line contains the numbers R, H, N, M, where R is the radius of the area illuminated by the spotlight, H is the side length of the square representing a carpet, N is the number of vertices of the convex polygon defining the stage, and M is the number of carpets. The second line contains N pairs of numbers, which are the coordinates of the polygon vertices in traversal order (either clockwise or counterclockwise). The third line contains M pairs of numbers, which are the coordinates of the carpet centers.
Output
Output two numbers on one line - the integer parts of the areas S_1 and S_2.