Long Python
Time limit2sMemory limit512 MB
Given that a Python holds n whole Parrots or m whole Monkeys, find the minimum and maximum number of whole Parrots that fit into one Monkey.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
One, two, left, right,
two times two is very simple
boa constrictors are measured
five times five, of any height
Parrot
After Monkey and Parrot had thoroughly studied the length of the Boa Constrictor, they became very bored. Then Elephant remembered that another Python also lives in the forest, and it too can be measured! The friends immediately set off to find it.
Like the Boa Constrictor, the Python is whole, so it cannot be measured in halves. After measuring the Python, Monkey and Parrot learned that the Python holds whole Parrots or whole Monkeys. Delighted, Monkey ran off to tell Elephant the result. After she left, Parrot became interested in the following question: how many times does he fit into one Monkey?
Since Monkey has run off and he cannot measure her, Parrot decided to try to find out how many whole Parrots can fit into one Monkey, using the results of measuring the Python. Given and , find the minimum and maximum number of whole Parrots that can fit into one Monkey.
Input
The input file contains two integers and , each on its own line: the number of Parrots and the number of Monkeys in the Python, respectively ().
Output
Output two numbers to the output file: the minimum and maximum number of whole Parrots in one Monkey.