integer(16) N,A,B,C,D
integer(16) NumOfNeg
logical check
read*,N,A,B,C,D

check=.False.
do NumOfNeg=0,N-1
  if(C*(N-1-NumOfNeg)-D*NumOfNeg<=B-A .and. B-A<=-C*NumOfNeg +D*(N-1-NumOfNeg))check=.TRUE.
end do

if(check)then
  print"(A)","YES"
else
  print"(A)","NO"
endif
end