The Two-Bank Lantern Raffle
The kingdom of cats has stations connected by two-way rope bridges. It is possible to travel between every pair of stations.
At the start of the Lantern Festival, exactly stations are selected uniformly at random among all subsets of that size. One traveler cat is placed at each selected station.
Every bridge has two bridgekeeper cats, one on each bank. The bridgekeepers are fixed and are not traveler cats. For each bridge, the following raffle is performed:
- Removing the bridge separates the stations into two components, one belonging to each bank.
- On each bank, its bridgekeeper makes a list containing their own name and the name of every traveler cat whose station lies in that bank's component.
- Each bank independently draws one name uniformly at random from its list.
- The bridge's lantern is lit if both banks draw the name of their own bridgekeeper.
All bank draws are independent after the traveler stations have been selected.
Find the expected total number of lit bridge lanterns.
Input
The first line contains two integers and (, ), the number of stations and the number of traveler cats.
Output
Let be the expected number of lit lanterns. Write as a reduced fraction , where and .
Samples
Sample 1
Input
3 2 1 2 2 3
Output
221832079
For this path with , the expected number of lit lanterns is . Its required modular representation is .
Sample 2
Input
4 2 1 2 1 3 1 4
Output
124780545
For this star, the expected total number of lit lanterns is , which has the shown modular representation.
Sample 3
Input
1 0
Output
0