3

$${w_j = \frac{(n_j+m_j-1)!}{(m_j-1)!n_j}}$$