Translate the following inference to logic notation: If Barbara listens to a song, then Michael is playing squash. Barbara is not listening to a song. If Michael plays squash, then Barbara is listening to a song. Therefore Michael is not playing squash.
p -> q. ~p. q -> p. Therefore ~q.