Singlet and triplet states of the CO3 and CO4 molecules