Synthesis of 2-oxo- and 2-imino-1,2-dihydropyridines by cobalt-catalyzed cyclocotrimerization of acetylenes with isocyanates and carbodiimides.