Question
A 120-quart beer barrel was discovered by Anna's parents. Furious, they plan to dump the barrel. Anna begs her parents to let her keep some of the beer. They say that Anna may do so if she is able to measure out an exact quart into each of a 7-quart and 5-quart vessel. You have exactly $1$ of each type of vessel. Note that Anna is allowed to pour beer from a vessel back into the beer barrel. Define a transaction as a pour of liquid from one container into another. What is the smallest number of transactions needed to accomplish the challenge? If impossible, respond with -1.