The present invention relates to compounds of formula (I): in which Y, Y, R, R 2, R 3 and R 4 are defined in the Summary of the Invention; capable of inhibiting the activity of BCR-ABL1 and mutants thereof. The invention further provides a process for the preparation of compounds of the invention, pharmaceutical preparations comprising such compounds and methods of using such compounds in the treatment of cancers.