In an old school arcade video game, you have reached the bonus level. There are several platforms, each with some coins. You must jump from one platform to another, collecting coins. You may only jump to a platform that is lower than your current one. You can start from any platform.
Your jumping behavior is described as follows. On each jump, your horizontal speed is constant and does not exceed . Your fall follows the physical law of free fall: the acceleration is , and your initial speed is .
Each platform is represented by a single point and given in the format "", where and are the platform's coordinates, and is the number of coins on it. A higher value of indicates a higher platform. Find the greatest number of coins you can collect.
Consists of multiple test cases. The first line of each test case contains three integers: the number of platforms (1 \leq n \leq 50), and the values of and (1 \leq g, v \leq 100). The next lines each describe a platform in the format "". It is guaranteed that 0 \leq X, Y \leq 5000, 0 \leq C \leq 10000.
For each test case, print in a separate line the greatest number of coins you can collect.
Example 1