When Are Combinations of Humans and AI Useful?