The input file name is TRIP.IN. The first line contains the integer numbers N (1<=N<=50,000), M (1<=M<=100,000), P ( 1<=P<=N), and T (0<=T<=1,000,000,000).
The following M lines describe the bus routes. Each line contains the integer numbers si, ti, ai, bi, ci, di, where si and ti are the source and destination towns of the bus route i, and ai, bi, ci, di describe the departure and arrival times as explained above (1<=si<=N, 1<=ti<=N, 0<=ai<=bi < ci<=di<=1,000,000,000).