Under construction

Still being built. Things may change

Race Against Time

Time limit2sMemory limit512 MB

Summary
Given students' distances and walking speeds, find the velomobile's pickup plan that gets the last student to school as early as possible, with boarding points.
Level

Medium7 of 10

Topics
Greedy, Sorting, Math
Solved
No attempts yet

Statement

The director of the school Лицей Программистов in the city of Linejsk has taught his students good discipline, but many of them still arrive late.

Linejsk has only one main street. The school is on it, and so are the homes of all its students. Disciplined students leave home at the same time. However, each student lives at a different distance from the school and walks or runs at a different but constant speed. Some are very slow, and some are Masha Gaika, the future world champion in the 100 meter dash.

To reduce late arrivals, the school bought one velomobile, and the school guard drives it. Besides the driver, the velomobile can carry one student. It moves at a constant speed vv.

The velomobile spends the night in the school garage. In the morning, at the exact moment all students leave their homes, it sets out toward them to give a ride to one student. It must take the student all the way to the school gate, because nobody wants to be dropped off in the middle of the road. After the velomobile has brought one student to school faster, it can set out toward the next late student.

The director wants to start classes as early as possible, which requires all students to reach the school. Help him plan the route for the velomobile driver so that the arrival time of the last student at school is as small as possible.

Input

The first line contains two integers nn and vv (1≤n≤1051 \le n \le 10^5, 1≤v≤10001 \le v \le 1000). Each of the next nn lines contains two integers xix_i and viv_i (1≤xi,vi≤10001 \le x_i, v_i \le 1000), where xix_i is the distance from the school to the home of student ii and viv_i is that student's speed.

Output

In the first line, print the minimum time tt needed for all students to reach school as a real number. In the second line, print the number kk of students the velomobile must pick up. Then print kk lines, each with the number of a student to pick up and the distance from the school at which that student must board the velomobile.

Examples1

  1. Example 1

    Input
    5 4
    1 1
    4 2
    3 1
    7 5
    5 1
    
    Expected output
    2.4
    2
    5 4
    3 0.8