How to Tell the Difference Between Tomato and Tobacco Hornworms

They’re both long green caterpillars — how do you tell the difference between these two hornworm species?