[] type h type Dungeon = { Exp: int; Death: int } let solve dungeons = dungeons |> Array.map (fun x -> x.Exp - 30000 * x.Death) |> Array.sortByDescending id |> Array.head |> fun x -> x * 6 >= 30000 * 100 |> function | true -> "YES" | _ -> "NO" 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 |> stdout.WriteLine