Multi-Agent Team Formation: Solving Complex Problems by Aggregating Opinions