402662: GYM100834 K Polycarp and Lamps
Description
Polycarp continues to play with lamps. Today he illuminates cylinder with N lamps. Center of cylinder's bottom in (xc, yc, 0), height is h, radius is r. Bottom belongs to xOy plane, top is parallel to bottom and its center is (xc, yc, h). Polycarp prepares N lamps, i-th lamp situates in (xi, yi, zi) point. The size of lamps is enough small to neglect it. Lamps enough powerfull to lighten any point in the space, if there are no obstacles. Cylinder absolutely opaque. Polycarp wants to find illuminated area of cylinder.
InputThe first line contains four integer numbers: xc, yc, h, r, where xc, yc are coordinates of bottom's center, h is height and r is radius. The second line contains one integer number: N. Next N lines contains three integers: xi, yi, zi, these are coordinates of i-th lamp.
All coordinates are greater than - 1001 and less than 1001. 1 ≤ h, r ≤ 1000. 1 ≤ N ≤ 100. There are no lamps in the cylinder and no lamps on cylinder's sides. In one point can be only one lamp.
OutputOutput the square of illuminated area of cylinder. You may assume that answers is coparated with the precision of 10 - 6.
ExamplesInput0 0 10 10Output
1
0 0 100
314.15926536Input
0 0 10 10Output
4
-100 0 -100
0 -100 -25
100 0 25
0 100 100
1256.63706144Note
A Lamp illuminates bottom only if its z coordinate less than 0, and top if greats h. If a lamp in the plane of bottom it does not illuminate them, same situation with top.