We calculate the masses of light and strange quarks using a high statistics lattice simulation of QCD with n f = 2 dynamical Wilson fermions. The simulation has been carried out at three different values of the sea quark mass. For each sea quark we have analyzed our data at five different values of the valence quark mass. This enables us to parameterize our results successfully in the ( m sea q ,m valence q ) plane, using a linear ansatz according to first order chiral perturbation theory (CPBT). We find m ligt MS (2GeV) = 2.7(2)MeV , which is lower than the result found in quenched simulations. For the strange quark, in a sea of two dynamical light quarks, we obtain m strange MS (2GeV) = 140(20)MeV .