{-# LANGUAGE MultiWayIf #-}

main :: IO ()
main = do
  [n,a,b,c,d] <- map read.words <$> getLine :: IO [Int]
  let step = d-c
      pos = step*(n-1)+1
      neg = c*2-step*(n-1)
      unit = pos+neg
      upperBound = a+(n-1)*d
      lowerBound = a-(n-1)*d
  putStrLn $
    if lowerBound <= b && b <= upperBound
      then if | step*(n-1)>=c*2 -> "YES"
              | (upperBound-b)`mod`unit <= pos -> "YES"
              | otherwise -> "NO"
      else "NO"
