Translate the following inference to logic notation: If Sarah cooks, then it is raining. If Joseph were happy, then it is raining. James is playing squash. If James plays squash, then Sarah is cooking. Therefore it is raining.
p -> q. r -> q. s. s -> p. Therefore q.