Deductibility of Health Insurance Premiums

In 2023, I paid family Cobra premiums that were subsidized by my former employer from March to July.  My wife is self-employed, and we switched to CHM (Christian Healthcare Ministries) from August to December.  Can we deduct the premiums paid to both, only one, or neither?