Translate the following inference to logic notation: If John were excited, then John is writing a letter. If Michael were poor, then John is not writing a letter. John is excited. Therefore Michael is not poor.
p -> q. r -> ~q. p. Therefore ~r.