logo AlgoBeat OnlineJudge
登录 注册

#215409. [ICPC 2022 Tehran R] Flower Festival

内存限制:512 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Today is the Flower Festival day. The festival is held in Rose Square, at the end of Flower Street. People are heading towards the festival on Flower Street with n cars, numbered 1 through n. Soroush, an expert traffic analyst, wants to know which car will arrive at Rose Square first. Using the traffic cameras on Flower Street, he has gathered the current location of all cars, along with their speeds. Each car maintains a constant speed throughout their journey. Also, the location of a car is defined as its distance from the start of Flower Street. Help Soroush find the first car that arrives at the festival. It is guaranteed that no two cars reach Rose Square at the same time.

输入格式

The first line of input contains two space-separated integers and , the number of cars and the length of Flower Street, respectively. The -th line (for ) contains the information of car numbered i, two space-separated integers and indicating its observed location and speed, respectively.

输出格式

Print the number of the car which will arrive at Rose Square first.

样例

样例输入 1

3 200
0 1
10 5
40 1

样例输出 1

2

样例输入 2

5 100
0 1
10 3
60 2
75 1
10 4

样例输出 2

3