Wall of Mordor --- Mission Impossible#11847

Wall of Mordor --- Mission Impossible

2 seconds
256 megabytes
Hard

The Black Wall, erected by Sauron along the borders of Mordor, is fortified with hundreds of watch-towers. The -th tower is located at point x_i on a line and has a base alertness level 2w_i. The towers are connected by signal beacons: if the distance between towers and does not exceed the beacon radius r_j, then tower adds its full alertness w_j to tower .

Gandalf and Aragorn can temporarily disable exactly one tower  (its beacon is completely switched off, and it shares no alertness with anyone). Frodo, possessing a bravery reserve , chooses another tower  near which he will attempt to cross the wall.

Effective alertness of the chosen tower  is defined as the alertness of the tower itself, 2w_P, plus the sum of alertness of towers that share their alertness (i.e. |x_P-x_j|\le r_j and is not disabled):

\mathrm{eff}(P,Q)=2w_P+ \sum_{\substack{j\neq P,\, j\neq Q \\ |x_P-x_j|\le r_j}}w_j.

Frodo wishes to maximize the chance of success, so the effective alertness of tower  must be minimal. Thus, one must choose distinct indices  so that

\mathrm{success}=a-\mathrm{eff}(P,Q)

is as large as possible.

If this value is negative for every pair , then there is no chance of success.

Input

The first line contains one integer  (2\le n\le 10^{5}) — the number of towers.

The second line contains one integer  (1\le a\le 10^{18}) — Frodo's bravery level.

Each of the following lines contains three integers x_i, w_i, r_i (-10^{9}\le x_i\le 10^{9}; 0\le w_i,r_i\le 10^{9}) — the coordinate, base alertness, and beacon radius of the -th tower.

Output

Print three space-separated integers — the maximum possible value of a - \mathrm{eff}(P,Q) and the indices and of a pair of towers achieving it (1 \le P,Q \le n and P \neq Q). If there are several such pairs, you can print any of them.

If this maximum value is negative for every pair , print instead.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Note

  • In the first example n=3, a=30. The selected pair of towers is (P,Q)=(2,3), for which

    \mathrm{eff}(2,3) = 2w_2 + w_1 = 2\cdot5 + 10 = 20,

    therefore

    \mathrm{success} = 30 - 20 = 10.
  • In the second example n=3, a=10. The smallest effective alertness among all pairs is

    \min_{P\neq Q}\mathrm{eff}(P,Q) = 20,

    achieved also by (P,Q)=(2,3). Since 10 - 20 < 0, the output is .