CO(NH2)2 the only product consists of 1 Carbon 1 Oxygen , 2 Nitrogen and 4 Hydrogen We are heating Ammonium Cyanate, Ammonium Ion NH4+ NH4+ consists of 1 Nitrogen 4 Hydrogen. Compare the reactant decomposed and product formed.
There should be 2 Nitrogen so Cyanate must contain one Nitrogen atom, one Carbon and one oxygen.