Translate the following inference to logic notation: If Jessica works, then it is late. Jessica is not working. If it is late, then James is listening to a song. If James listens to a song, then Jessica is working. Therefore it is not late.
p -> q. ~p. q -> r. r -> p. Therefore ~q.