Is it known when a marginal-rate-of-substitution function can be rationalized by some utility function?

More precisely, and focusing on the case of two goods, what conditions are required on $M: (\mathbb R_{\geq 0})^2 \to \mathbb R$ in order for there to exist $u: (\mathbb R_{\geq 0})^2 \to \mathbb R$ such that for all $x,y \geq 0$,
$$
M(x,y)=\frac{u_x(x,y)}{u_y(x,y)}
$$