Compounds of the formula and pharmaceutically acceptable salts thereof for use as inhibitors of cyclin dependent kinases, wherein: X is O, S(O)m; Y is alkyl, aryl, arylalkyl, heteroaryl, heteroarylalkyl, cycloalkyl, cycloalkylalkyl, heterocycloalkyl, heterocycloalkylalkyl; R1 is hydrogen or lower alkyl; R2 is alkyl, aryl, arylalkyl, heteroaryl, heteroarylalkyl, cycloalkyl, cycloalkylalkyl, heterocycloalkyl, heterocycloalkylalkyl, -O-alkyl, -O-aryl, -NR4R5; R3 is hydrogen or lower alkyl; R4 is hydrogen, alkyl, aryl, arylalkyl, heteroaryl, heteroarylalkyl, cycloalkyl, cycloalkylalkyl, heterocycloalkyl, heterocycloalkylalkyl, -O-alkyl, -O-aryl; R5 is hydrogen, alkyl, aryl, alkylaryl, heteroaryl, alkylheteroaryl, cycloalkyl, alkylcycloalkyl, heterocycloalkyl, alkylheterocycloalkyl, -O-alkyl, -O-aryl; and m is 0, 1 or 2. The compounds of formula I are protein kinase inhibitors and are useful in the treatment and prevention of proliferative diseases, for example, cancer, inflammation and arthritis. They may also be useful in the treatment of neurodegenerative diseases such as Alzheimer's disease, cardiovascular diseases, viral diseases and fungal diseases.