  We determine the charm and strange quark masses in the $\overline{\text{MS}}$
scheme, using $n_f=2+1+1$ lattice QCD calculations with highly improved
staggered quarks (HISQ) and the RI-SMOM intermediate scheme to connect the bare
lattice quark masses to continuum renormalisation schemes. Our study covers
analysis of systematic uncertainties from this method, including
nonperturbative artefacts and the impact of the non-zero physical sea quark
masses. We find $m_c^{\overline{\text{MS}}}(3 \text{GeV}) = 0.9896(61)$ GeV and
$m_s^{\overline{\text{MS}}}(3 \text{GeV}) = 0.08536(85)$ GeV, where the
uncertainties are dominated by the tuning of the bare lattice quark masses.
These results are consistent with, and of similar accuracy to, those using the
current-current correlator approach coupled to high-order continuum QCD
perturbation theory, implemented in the same quark formalism and on the same
gauge field configurations. This provides a strong test of the consistency of
methods for determining the quark masses to high precision from lattice QCD. We
also give updated lattice QCD world averages for $c$ and $s$ quark masses.
