eolymp
bolt
Try our new interface for solving problems

Wall

Vasiliy Pupkin decided to update the wallpaper on a wall, which had dimensions of $n$ meters in height and $m$ meters in width. When choosing the material, he considered that the wallpaper is sold in rolls with a width of $1$ meter and a length of $k$ meters. In accordance with tradition, the wallpaper is applied vertically --- from ceiling to floor. Vasiliy wants to apply the wallpaper in such a way that there are no horizontal seams, forming continuous strips (meaning one continuous piece is applied from ceiling to floor). It is possible to cut a piece of the required size from the roll. Of course, if there is a leftover piece of smaller size, it will be wasted. What is the minimum number of rolls Vasiliy should buy, and how many meters of wallpaper will be wasted in this case? \InputFile Three integers $n, m$, and $k~(1 \le n \le 100, 1 \le m \le 100, n \le k \le 100)$. \OutputFile Output two numbers --- the minimum number of rolls and the total length of wallpaper wasted.
Time limit 1 second
Memory limit 128 MiB
Input example #1
6 7 20
Output example #1
3 18
Input example #9
2 5 5
Output example #9
3 5