Here’s a pop quiz for you. Tom is taller than Dick. Dick is taller than Harry. Who’s taller, Harry or Tom?

If you said Tom, congratulations! You just demonstrated what’s called “transitive inference” — the ability to compare things indirectly, based on previous juxtapositions. But before you pat yourself on the back too much, you should know that this skill was recently demonstrated by another creature: the humble paper wasp that might be living in your backyard right now.

In the summer of 2017, researchers at the University of Michigan put two species of paper wasps through a transitive inference test. A statistically significant portion of the time, the wasps passed. Other animals — including rats, geese and cichlid fish — have also exhibited this capacity. But this study, which was published Tuesday in Biology Letters, is the first to successfully showcase it in an invertebrate (honeybees failed a similar test in 2004).

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

Paper wasps are found on every continent except Antarctica. You might be near some right now. “They tend to nest in the eaves of houses, or inside barbecue grills,” said Elizabeth Tibbetts, the study’s lead author.