Pion diffraction dissociation on carbon nuclei at 6.1 and 18.1 GeV/c