Let $R$ be a commutative ring with identity. Suppose $R=(r_1,\ldots,r_k)$. Take an homomorphism of $R$-modules: $f:M\rightarrow N$. Suppose that the function $\frac{f}{1}:M_{r_i}\rightarrow N_{r_i}$ is an isomorphism for every $i=1,\ldots,k$; how can I prove that then $f$ is an isomorphism?
$M_{r_i}$ denotes the localization of $M$ at the multiplicatively closed set $\{r_i^n:n\geq0\}$.