We determine the charm and strange quark masses in the 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 MS c (3 GeV) = 0.9896(61) GeV and m MS s (3 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.arXiv:1805.06225v1 [hep-lat]