let t = 24 * 60 * 60 let [| n; a; h; m; s |] = stdin.ReadLine().Split() |> Array.map int let x = n * a let y = (h * 60 + m) * 60 + s if x + y >= t then "Yes" else "No" |> printfn "%s"