The invention provides compounds of the formula (0) or salts or tautomers or N-oxides or solvates thereof for use in the prophylaxis or treatment of disease states and conditions such as cancers mediated by cyclin-dependent kinase and glycogen synthase kinase-3.In formula (0):X is a group R1-A-NR4— or a 5- or 6-membered carbocyclic or heterocyclic ring;A is a bond, SO2, C═O, NRg(C═O) or O(C═O) wherein Rg is hydrogen or C1-4 hydrocarbyl optionally substituted by hydroxy or C1-4 alkoxy;Y is a bond or an alkylene chain of 1, 2 or 3 carbon atoms in length;R1 is hydrogen; a carbocyclic or heterocyclic group having from 3 to 12 ring members; or a C1-8 hydrocarbyl group optionally substituted by one or more substituents selected from halogen (e.g. fluorine), hydroxy, C1-4 hydrocarbyloxy, amino, mono- or di-C1-4 hydrocarbylamino, and carbocyclic or heterocyclic groups having from 3 to 12 ring members, and wherein 1 or 2 of the carbon atoms of the hydrocarbyl group may optionally be replaced by an atom or group selected from O, S, NH, SO, SO2;R2 is hydrogen; halogen; C1-4 alkoxy (e.g. methoxy); or a C1-4 hydrocarbyl group optionally substituted by halogen (e.g. fluorine), hydroxyl or C1-4 alkoxy (e.g. methoxy);R3 is selected from hydrogen and carbocyclic and heterocyclic groups having from 3 to 12 ring members; andR4 is hydrogen or a C1-4 hydrocarbyl group optionally substituted by halogen (e.g. fluorine), hydroxyl or C1-4 alkoxy (e.g. methoxy).