[] type h type Dungeon = { Exp: int; Death: int } let solve dungeons = let dungeon = dungeons |> Array.map (fun x -> x.Exp - 30000 * x.Death) |> Array.indexed |> Array.sortByDescending snd |> Array.head let isEnable = dungeon |> snd |> fun x -> x * 6 >= 30000 * 100 let dungeons = Array.create 6 (dungeon |> (fst >> (+) 1)) isEnable, dungeons let R() = stdin.ReadLine() let N = R() |> int let GD = Array.init N (fun _ -> let t = R().Split() |> Array.map (int>>(*)1) { Exp = t.[0]; Death = t.[1]}) solve GD |> function | (true, xs) -> stdout.WriteLine "YES" xs |> Array.iter stdout.WriteLine | _ -> stdout.WriteLine "NO"