The branching fraction ratios of (Formula presented) and (Formula presented) decays are measured with respect to their muonic counterparts, using a data sample corresponding to an integrated luminosity of (Formula presented) collected by the LHCb experiment in proton-proton collisions at (Formula presented). The reconstructed final states are formed by combining (Formula presented) mesons with (Formula presented) candidates, where the (Formula presented) is reconstructed via the (Formula presented) decay. The results are (Formula presented), (Formula presented), where the first uncertainties are statistical and the second systematic. The two measurements have a correlation coefficient of (Formula presented) and are compatible with the standard model.