The ACM / ICPC team has a large room, the length and width of which is 10 6 .
However, the guys in ACM / ICPC teams are too lazy to make their study room tidy. So there
are wires everywhere and divide the room into several parts. A team in a part of the room cannot
move out of it or they might touch the wires and the network will down. To make every team can
compete in the contest, they have to set up some facilities such as toilet since the teams should
do anything in their parts.
Now, we will give you the map of our study room and the position of the teams, your task is
to calculate how many facilities is required to let every team can access a facilities to finish the
contest without move out of their part.
You should note that two or more teams can share a facility.