UVA10709 Intersection is Not that Easy

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=19&page=show_problem&problem=1650 [PDF](https://uva.onlinejudge.org/external/107/p10709.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10709/871814c7a820d5554f76f959bba416356b7c0fc1.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10709/07add34d9eb22c68386fdd564a879ffbfa4ad0af.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10709/54a75e4fdb60c9216a3ad95baa53a492f1799fcf.png)