# Characterization of epic morphisms in the category of rings.

Let $C$ denotes the category of rings (with identities). It's easy to prove that for any $R\in \text{ob }C$, any multiplicative set $S\subset R$ and any ideal $I\leqslant R$, both $R\to S^{-1}R$ and $R\to R/I$ are epic morphisms in $C$. My question is that to what extent the converse is true. More precisely, I wonder if the following statement holds:

Let $p:R\to R^{\ \prime}$ be an epic morphism in $C$. Then there exists a multiplicative set $S\subset R$ with $p_1: R\to S^{-1}R$ being the corresponding canonical map, an ideal $I\leqslant S^{-1}R$ with $p_2:S^{-1}R\to S^{-1}R/I$ being the corresponding canonical map, and an isomorphism $i:S^{-1}R/I\xrightarrow{\sim}R^{\ \prime}$, such that $p=i\circ p_2\circ p_1$.