UVA10899 Billiard again
Description
[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1840
[PDF](https://uva.onlinejudge.org/external/108/p10899.pdf)

Input Format

Output Format
