Branch-Split Breakfast
There are clearings connected by trails that form a tree. Clearing contains a closed station holding units of milk.
At night, exactly distinct clearings are selected uniformly at random from all possible sets. One cat sleeps at each selected clearing.
At dawn, each station is considered independently. For a clearing , remove and every trail incident to it. The station at opens if and only if both of the following conditions hold:
- Clearing was not selected.
- At least two different connected components remaining after the removal each contain at least one selected clearing.
If the station at opens, all units of its milk are released. Otherwise, it releases nothing.
Find the expected total amount of milk released by all stations.
Input
The first line contains two integers and (), the number of clearings and the number of sleeping cats.
Output
Let the exact expected total amount of released milk be in lowest terms, where . Let .
Samples
Sample 1
Input
4 2 5 2 4 7 1 2 2 3 3 4
Output
2
For the six possible selected pairs, the released amounts are . Their average is .
Sample 2
Input
4 2 3 1 1 1 1 2 1 3 1 4
Output
500000005
Only selections consisting of two leaves open the station at clearing . This happens for of the possible selections, so the expected amount is , represented modulo as .