Frequency stabilization of a primary subterahertz oscillator by a frequency comb of a femtosecond laser