In the game Dota-Allstars, Darkterror (faceless void) is famous for his Time Walk plus ChronoSpere skill combos. The combos take the following actions:First, Darkterror can move himself from his initial position within a range of Rw unit(s) by the skill Time Walk. Then he can cast a ChronoSpere which freezes all the heroes it covers. The distance between the center of the sphere and Darkterror must be no further than Rc unit(s). And the radius of the sphere is R unit(s). In a Dota-Allstars battle, Facer was blamed for his poor combos. He always froze his fellows and left his enemies at large. To rehabilitate his fame, Facer has practiced the hero thousands of times. Now he needs to analysis the replays and find out whether he made the best decision in performing the combos. Given the heroes' positions and their threat levels, Facer wants to know the maximum sum of threat levels can be covered by a ChronoSpere.
The first line of input consists of three integers, Rw, Rc and R. (0 ≤ Rw, Rc, R ≤ 1000000)The following ten lines describe the heroes in the battle. Each line contains three integers, x, y, and l indicating the hero's position and the threat level. (-1000000 ≤ x, y, l ≤ 1000000). The first line of the ten always describes Darkterror and his threat level is always zero.