The first line contains the number of vertices of the polygon N (3≤N≤100000).
Each of the next N lines holds the coordinates of one vertex of the convex polygon: two integers whose absolute value is smaller than 109. The vertices are given in clockwise order.
The next line contains the number of lines M (1≤M≤100000).
Each of the next M lines holds three integers A, B, C that describe the line Ax+By+C=0. Here ∣A∣,∣B∣,∣C∣≤109, and A and B are never both 0. Every given line crosses the polygon.