2-Cyano-3-hydroxy-3-(methylthio) acrylamide and 2-cyano-3-methylthio-3 (phenylamino) acrylamide condenses with benzoic acid in the presence of polyphosphoric acid trimethylsilyl ester to give 5-cyano-4-methylthio-2-phenyl-1, 3-oxazin-6-one (O, N double rearranged product) and 5-cyano-6-methylthio-2, 3-diphenyl-1, 3-diazin-4-one (N, N double rearranged product), respectively.