Griffith's Tangled Fish Bowls
Griffith has built a network of rooms connected by corridors. The network is a tree. Room contains a bowl with fish.
Exactly distinct rooms are chosen uniformly at random from all possible sets of rooms, and one cat is placed in each chosen room. The cats then stretch a string between every unordered pair of cats. Each string follows the unique simple path between its pair of rooms.
The bowl in room spills if room is an internal room of the path between at least one pair of cats. In other words, for at least one string, the path enters and leaves room through two distinct corridors. Merely being an endpoint of a string does not make the bowl spill.
The total spill is the sum of over all rooms whose bowls spill. Find the expected total spill, modulo .
Input
The first line contains two integers and (), the number of rooms and the number of cats.
Output
Let the expected total number of spilled fish, written in lowest terms, be . Print
Samples
Sample 1
Input
3 2 5 7 11 1 2 2 3
Output
333333338
There are three equally likely placements: , , and . Only placement spills the bowl in room , so the expected spill is , represented modulo as .