The present invention relates to compounds of formula (I): in which Y, Y1, R1, R2, R3 and R4 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.