The Impact of Teams in Multiagent Systems