using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, a, h, m, s) = (c[0], c[1], c[2], c[3], c[4]); s += n * a; if (s >= 60) { m += s / 60; } if (m >= 60) { h += m / 60; } WriteLine(h >= 24 ? "Yes" : "No"); } }