How to perform searches with groups of OR statements joined by AND statements
The best way to do what you want is to :


create a smart group for (X OR Y OR Z) using search builder
create a smart group for (C OR D) using search builder
use search builder to combine all the criteria using Contact -> Group -> '=' -> (the group you have created)


I agree it's pretty tedious... but someone will have to re-work the search builder to allow the logic you want. It's not a simple task.