The reaction between barbituric acid or 2-thiobarbituric acid and different benzaldehydes, dependent upon the applied reaction conditions, selectively yields three different product types, i.e. 5-benzylidene(thio)barbituric acids II, symetric Michael adducts III or 5-phenyl-1H-pyrano[2,3-d]pyrimidine-2,4(3H,5H)-diones and 5-phenyl-2-thioxo-2,3-dihydro-1H-pyrano[2,3-d]pyrimidin-4(5H)-ones IV. Th...