Tudor likes pusheens!
Pusheen Boi has recently requested for a /pusheen
command to be added in Discord, so that he can spam Discord with
pusheens.
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.
Input Specification
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 appear more than once.
The final line of input contains two integers, and .
Output Specification
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.
Sample Input
2 1
1 2
1 2
Sample Output
0
Comments