Splitting of N-photon state