At the KBTU graduation party there are n girls D1,D2,…,Dn and 2n−1 boys B1,B2,…,B2n−1. Girl Dj is acquainted with exactly the boys B1,B2,…,B2j−1 (the first 2j−1 boys).
We want to pick exactly r dancing pairs. Each pair consists of one girl and one boy who are acquainted, and no student may belong to more than one pair (every girl and every boy appears in at most one chosen pair). Count the number of ways to choose such a set of r pairwise-disjoint acquainted pairs. Two choices are considered different if their sets of pairs differ.
Two integers n and r (1≤n,r≤106) separated by a space.
Print the number of ways, taken modulo 2946859.