UVA10814 Simplifying Fractions

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1755 [PDF](https://uva.onlinejudge.org/external/108/p10814.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10814/92f903b9ed5dd372de8acd277c7f0c26f3ec798f.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10814/b97397f713535418a8a62118c86d0e18a8e2b0fe.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10814/4379cab8fb0d49f482a4a1487d4ca741e84ee1a4.png)