import std; void read(T...)(string S, ref T args) { auto buf = S.split; foreach (i, ref arg; args) { arg = buf[i].to!(typeof(arg)); } } void main () { int H, M; readln.read(H, M); if (H < 7) { writeln("Yes"); } else if (7 <= H && H < 9) { if (M < 30) { writeln("Yes"); } else if (H == 7) { writeln("Late"); } else if (H == 8 && M < 30) { writeln("Late"); } else { writeln("No"); } } else { writeln("No"); } }