#Lutece1802. The Night of Xiaomai

The Night of Xiaomai

Migrated from Lutece 1802 The Night of Xiaomai

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

The brother is on business, so Xiaomai will have a fantastic night, which makes her do anything she wants. There are n game(s) of kinds to be played. In every game, she can get aia_i points on happiness, but it takes bib_i points on time and cic_i points to have the room dirty. If the brother comes at the time of xx, she is still playing the game or the points are over y on the room dirty. As a result, she will be punished. Therefore, the cute Xiaomai hope that you can help her make a perfect plan, which can get the most happiness points without the brother’s punishment.

title

Input

The first line contains three integers nn,XX and YY (n=5n=50X,Y1080\leq X ,Y\leq 10^8).
Each of the following nn lines contains three integers aia_ibib_i and cic_i (0ai,bi,ci1080\leq a_i,b_i,c_i\leq 10^8).

Output

In the first line print a single integer mm denoting the happy points Xiaomai gets.

Samples

5 5 5
10 6 0
2 4 4
3 4 4
0 0 0
0 0 0
3