Speed Limits

No attempts yetTime limit1sMemory limit128 MB

Problem

Peter is driving to the finals of a programming contest. The main part of his route runs along a newly built highway. He gets on the highway at kilometer ss and gets off at kilometer kk (with s<ks < k). His car has a top speed of vmaxv_{\max} kilometers per hour and can change speed instantly.

Peter loves to drive fast. If he covers xx kilometers at speed vv, his satisfaction increases by xvx \cdot v. He wants to drive from kilometer ss to kilometer kk so that his total satisfaction is as large as possible.

There are nn speed limits on the highway. The ii-th limit applies from kilometer aia_i to kilometer bib_i; inside that range he may not drive faster than viv_i kilometers per hour. Where several limits cover the same stretch of road, he must obey all of them at once (that is, the strictest one).

Peter's friends will quietly remove exactly one of the speed limits before he arrives. Peter wants to choose which limit to remove so that his best achievable satisfaction becomes as large as it can be. Determine which limit that is.

Input

The first line contains four integers nn, ss, kk, and vmaxv_{\max} separated by single spaces, where 1n1000001 \le n \le 100000, 0s<k10000000 \le s < k \le 1000000, and 1vmax3001 \le v_{\max} \le 300.

Each of the next nn lines describes one speed limit. The (i+1)(i+1)-th line contains three integers aia_i, bib_i, and viv_i separated by single spaces, where 0ai<bi10000000 \le a_i < b_i \le 1000000 and 1vi4001 \le v_i \le 400. They mean that from kilometer aia_i to kilometer bib_i the speed may not exceed viv_i kilometers per hour.

Output

Print one integer: the number of the speed limit that should be removed so that Peter's satisfaction is maximized. The speed limits are numbered from 11 to nn in the order they appear in the input. If removing any one of several limits yields the same maximum satisfaction, print the smallest such number.