n,a,h,m,s = map(int,input().split()) time = 24*3600-h*3600-m*60-s print('YNeos'[time > n*a::2])