Tudor likes pusheens!
Pusheen Boi has recently requested for a
/pusheen command to be added in Slack, so that he can spam Slack with
Meanwhile, Tudor's farm of servers has gotten to be rather large. There are pairs of servers that are connected and therefore can directly communicate with each other. A server can vacuously communicate with itself. All servers can communicate with each other, perhaps by using intermediate servers.
Pusheen Boi wants to make sure that he can send pusheens from server to server . Tudor, wanting to reduce the complexity of his server farm, wants to know the maximum number of pairs of servers that he can disconnect while still preserving Pusheen Boi's wishes.
The input starts with two integers and , .
pairs of lines follow, each containing two distinct integers and , indicating that servers and can communicate. You may assume and no edges appears more than once.
The final line of input contains two integers, and .
Output the maximum number of pairs of servers that can be disconnected, such that and can still communicate.
Sample Data ZIP
Click here for ZIP.
2 1 1 2 1 2