Cmc question

If I have cmc and the San Fran defense can I play both against each other?

I usually dont want to play a DST that plays against one of my players, but they are both really good in their own categories so I would play them.

Why not? Both should be effective. CMC will never leave your starting lineup and SF DST is top 5