Measurement of the Branching Ratios of D+ and D+s Hadronic Decays to Four-Body Final States Containing a KS