It relates to the use of compounds of formula (I'), or their pharmaceutically or veterinary acceptable salts, or their stereoisomers or mixtures thereof, as anticancer agents and as agents for generating induced pluripotent stem cells. Compounds of formula (I'), wherein R2' is an alcoxy group, a hydrocarbon chain or a ring system, and R1, R3, and R4 are as defined herein, are dual inhibitors of histone methyltransferases and DNA methyltransferases. It also relates to the compounds of formula (I'), or their pharmaceutically or veterinary acceptable salts, or their stereoisomers or mixtures thereof, wherein R2' is phenyl or 5- to 6-membered heteroaromatic ring, both optionally fused to another rings (i.e., compounds of formula (I)). It also relates to pharmaceutical or veterinary compositions containing compounds of formula (I).