LCC '23 Contest 2 S3 - Fungi and Molds

View as PDF

Submit solution

Points: 7 (partial)
Time limit: 0.6s
Memory limit: 64M

Author:
Problem type

Max is a passionate fermenter who collects funky yeast strains, the fanciest fermentation apparatus, and pungent molds of every color. His basement is always filled with a variety of bubbling brews that release stenches so strong it makes his roomates regret moving in with him.

Max also enjoys challenging himself to make delicious dishes using fermented foods. However, he recently came across an interesting recipe that puzzles him. The recipe calls for both a bacteria and a yeast.

Normally, in fermentation recipes, there is a fermenting agent as well as a substrate. The fermenting agent is the living organism, like a bacteria or fungus, that grows on the substrate and multiplies. Normally, the fermenting agent consumes sugars and produce byproducts such as acids, gases or alcohols. The substrate is the material that houses the fermenting agent, which could be a grain or bean (like rice or soy for rice wine and soy sauce), a vegetable (like cabbage for kimchi), or even a liquid (like milk for cheese). The substrate is like the feeding ground for the microorganism.

Interestingly, in this recipe, both the bacteria and the yeast can be chosen to be either the fermenting agent or the substrate; the recipe does not specify which one should be used as which.

However, Max is always trying to max-imize his fermentation products. He knows he has A grams and B grams of the bacteria and the yeast, respectively. If the bacteria were used as the fermenting agent and the yeast as the substrate, he would end up with A^B grams of product in total. If the yeast were used as the fermenting agent and the bacteria as the substrate instead, he would end up with B^A grams of product.

Please help Max determine which of the options maximizes output.

Constraints

Subtask 1 [20%]

1 \le A, B \le 12

Subtask 2 [80%]

1 \le A, B \le 10^9

Input Specification

The first line contains two space-separated integers, A, B.

Output Specification

If A^B is strictly greater than B^A, output Bacteria on yeast..

Otherwise, output Yeast on bacteria..

Sample Input 1

15 16

Sample Output 1

Bacteria on yeast.

Sample Explanation 1

15^{16} is equal to 6,568,408,355,712,890,625.

16^{15} is equal to 1,152,921,504,606,846,976.


Comments

There are no comments at the moment.