Photofragmentation of cyanogen upon carbon and nitrogen K-shell excitation by partial ion yield experiments