Plancherel measure for and : Explicit formulas and Bernstein decomposition