  The production of charm and beauty quarks in ep interactions has been
measured with the ZEUS detector at HERA for squared four-momentum exchange
Q^2>20 GeV^2, using an integrated luminosity of 126 pb^{-1}. Charm and beauty
quarks were identified through their decays into muons. Differential cross
sections were measured for muon transverse momenta p_T^{\mu}>1.5 GeV and
pseudorapidities -1.6<\eta^{\mu}<2.3, as a function of p_T^{\mu}, \eta^{\mu},
Q^2 and Bjorken x. The charm and beauty contributions to the proton structure
function F_2 were also extracted. The results agree with previous measurements
based on independent techniques and are well described by QCD predictions.
