[C:1]1([NH2:8])[C:2]([NH2:7])=[CH:3][CH:4]=[CH:5][CH:6]=1.CS[C:11]([S:21][CH3:22])=[C:12]([C:15]1[N:20]=[CH:19][CH:18]=[CH:17][N:16]=1)[C:13]#[N:14]>>[NH:7]1[C:2]2[CH:3]=[CH:4][CH:5]=[CH:6][C:1]=2[NH:8][C:11]1=[C:12]([C:15]1[N:20]=[CH:19][CH:18]=[CH:17][N:16]=1)[C:13]#[N:14].[S:21]1[C:22]2[CH:4]=[CH:5][CH:6]=[CH:1][C:2]=2[NH:7][C:11]1=[C:12]([C:15]1[N:20]=[CH:19][CH:18]=[CH:17][N:16]=1)[C:13]#[N:14]In the first step of the synthesis, a benzene-1,2-diamine (1, X═NH) or 2-aminothiophenol (1, X═S) is coupled with a 3,3-bis(methylthio)-2-(pyrimidin-2-yl)acrylonitrile 9 to give a 2-[1H-benzimidazol-2(3H)-ylidene]-2-(pyrimidin-2-yl)acetonitrile or 2-[benzothiazol-2(3H)-ylidene]-2-(pyrimidin-2-yl)acetonitrile 6. The reaction is carried out under generally the same conditions as are used in the first step of the first half of Reaction Scheme 1. In the second step, the compound of formula 6 is hydrolyzed to a 2-[1H-benzimidazol-2(3H)-ylidene]-2-(pyrimidin-2-yl)acetamide or 2-[benzothiazol-2(3H)-ylidene]-2-(pyrimidin-2-yl)acetamide 8, as in Reaction Scheme 1.