You are given a connected graph with nodes and edges. Two players and are playing a game with this graph. A person chooses an edge uniformly, randomly, and removes it. If the size (number of nodes in component) of two non-empty connected component created are EVEN, then wins otherwise player wins.
Find the probability of winning the game for and . The probability is of the form where and are both coprimes. Print .
Note: can only select the edges which divide the graph into two non-empty connected components after they are removed. If no such edge is present in the graph, then the probability to win can be 0 for both and .
Input format
Output format
Print two space-separated integers denoting the probability of winning for and respectively.
Constraints
X can choose only edge 1-4 and B wins in that case.