Trees
In the capital city of Olympia, a new Olympic park is being planned within a designated territory. This territory is shaped like a convex polygon. The park designer intends to plant trees in several green zones, which are represented as circles on the map. Each green zone is defined by the coordinates of its center and its radius.
The task is to plant trees at points with integer coordinates that lie within the park (including its boundary) and also within at least one green zone (including its boundary). If a point belongs to multiple overlapping green zones, only one tree should be planted there.
**Task**
Write a program that, given the coordinates of the polygon's vertices defining the park's territory, and the coordinates and radii of the green zones, calculates the number of trees to be planted.
**Input**
The first line of the input contains an integer (N (3 N 10^5)) — the number of vertices of the polygon defining the park's territory. The next (N) lines each contain two integers — the x and y coordinates of the vertices, listed in either clockwise or counterclockwise order. The following line contains an integer (M (1 M 50,000)) — the number of green zones. The next (M) lines each contain three integers: the x and y coordinates of the center of a green zone, and its radius. All coordinates are integers within the range ([-10^9, 10^9]). The radii are positive integers, and the total sum of all radii does not exceed (10^5). Note that some green zones may be entirely within others, and some may lie outside the polygon. Different zones may share centers or even coincide.
**Output**
Output a single integer on one line — the number of trees that will be planted according to the designer's plan.
**Scoring**
The test set is divided into blocks with the following additional conditions:
1. 60- 20- 30- 252. 40