Delivery#11038

Delivery

1 second
128 megabytes
Very easy

Ralph decided to give Vanellope one very beautiful model car for her birthday and now is looking for where to buy it. Ralph found stores that sell this model and numbered them from to . In the shop number , the model costs p_i points.

Since Ralph is always very busy, he does not have time to go to the store. Therefore, he decided to use the delivery service, which is available in all stores. In shop number , shipping costs d_i points. A feature of local deliveries is that the gasoline that the driver of the car spends is always paid separately. Ralph knows that gas now costs points per liter, and he also knows that the delivery truck will use exactly v_i liters of gasoline from the store with number .

Help Ralph to determine the minimum cost of the desired model, including shipping, among all the stores he found.

Input

The first line contains two integers and (1 \leq n, c \leq 100) - the number of stores found by Ralph and the cost of gasoline per liter, respectively.

Each of the following lines contains three integers p_i, d_i, v_i (1 \leq p_i, d_i, v_i \leq 100) - the cost of the model, the cost of delivery and the volume of gasoline in liters required for delivery for the store with the number .

Output

Print a single integer - the minimum cost of the model including shipping.

Examples

Example 1

Loading
Loading