Cooperative output regulation of multi-agent systems