Byteman, a well known burglar, wants to rob the National Museum of Byteotia. He is after the royal family jewels, which are on display in the grandest hall of the museum. The hall holds n exhibits, and m guards watch them. The curator did not want the guards to get in the way of the visitors, so he ordered them to stand at assigned positions and look in one direction the whole time.
Byteman got hold of the plan of the hall, with the positions of the exhibits and the guards marked on it. A jeweler he knows valued every jewel on display, and he also found out how much it costs to quietly persuade each guard to look away during the break in.
Byteman now picks the guards to bribe so that the total value of the jewels that no unbribed guard sees, minus the cost of the bribes, is as large as possible.
The first line contains two integers n and m (1≤n,m≤200000), the number of exhibits and the number of guards. Positions are given in a rectangular coordinate system on the plan. The second line contains two integers w and h (1≤w,h≤109) describing the field of view of the guards. Every guard looks toward decreasing y, and the tangent of half of the viewing angle is w/h. Guards and exhibits have negligible size. A guard sees every exhibit inside his field of view, including the boundary of that field, even when other exhibits or guards are in the way. That is, a guard standing at (a,b) sees the exhibit at (x,y) when b−y≥0 and ∣x−a∣⋅h≤(b−y)⋅w.
The next n lines describe the exhibits. The i-th of them contains three integers xi, yi, vi (−109≤xi,yi≤109, 1≤vi≤109), meaning that exhibit i is worth vi bytecoins and lies at the point (xi,yi). The next m lines describe the guards in the same format, where vi is the amount of bytecoins Byteman has to pay to bribe guard i. At most one guard or exhibit lies at any point.
Print one line with one integer, the maximum profit in bytecoins that Byteman can reach.

The picture shows the first example. The viewing angle of each guard is a little over 67 degrees. Byteman should bribe two guards, paying 3 + 6 bytecoins, and take the exhibits worth 2 + 8 + 4 + 1 bytecoins.