Multicomponent reaction of 3-amino-5-methylpyrazole, aliphatic aldehyde (paraformaldehyde or acetaldehyde) and acetylacetone in water by conventional heating, microwave or ultrasound activation undergoes on molar amounts of reagents 2:1:2, respectively, leads bis(2,5,7-trimethylpyrazolo[1,5-a]pyrimidin-6-yl)-substituted methane or to corresponding 1,1-bis-substituted ethane.