Radiation measurements with a double-junction stacked Josephson flux-flow oscillator on-chip coupled to an SIS detector are reported. Impedance matching between the oscillator and the detector has been achieved using a broad band coupling circuit. Radiation power in the detector up to 10 nW has been measured in the frequency range between 170 and 410 GHz. Coherent radiation from two stacked junctions has been observed both at the fundamental Josephson frequency and at its second harmonic. The distribution of the radiation power between first two harmonics allows us to distinguish between mutually coupled in-phase and out-of-phase flux-flow modes in the junctions. Coherent operation of stacked Josephson junction oscillators in the millimeter and sub-millimeter wave band is demonstrated.