There are provided according to the invention novel compounds of formula (I) or a pharmaceutically acceptable salt thereof: wherein: X represents a nitrogen atom; Y represents -C(H 2 )-, (-C(H 2 )-) 2 , -S(O 2 )- or -C(=O)-; Z represents -C(H 2 )-, -S(O 2 )-, -N(R z )-, or an oxygen or sulphur atom; A represents hydrogen or -CH 2 OH; R z represents hydrogen, C 1-6 alkyl, C 1-6 alkoxy, -COR 7 or-SO 2 R 7 ; R 1 represents halogen, C 1-6 alkyl, C 1-6 alkoxy, =O, haloC 1-6 alkyl, haloC 1-6 alkoxy, hydroxyl or -CH 2 OH; m represents an integer from 0 to 3; R 2 represents halogen, =O, C 1-6 alkyl (optionally substituted by one or more hydroxyl groups), -COOR 7, -CONR 7 R 8 , C 1-6 alkoxy, haloC 1-6 alkyl, haloC 1-6 alkoxy or C 1-6 alkylOC 1 - 6 alkyl; n represents an integer from 0 to 3; p and q independently represent an integer from 0 to 2; R 3 represents an -aryl, -heteroaryl, -heterocyclyl, -aryl-aryl, -aryl-heteroaryl, -aryl-heterocyclyl, -heteroaryl-aryl, -heteroaryl-heteroaryl, -heteroaryl-heterocyclyl, -heterocyclyl-aryl, -heterocyclyl-heteroaryl or-heterocyclyl-heterocyclyl group, all of which may be optionally substituted by one or more (e.g. 1, 2 or 3) halogen, C 1-6 alkyl (optionally substituted by one or more hydroxyl groups), C 3-8 cycloalkyl, C 1-6 alkoxy, hydroxyl, haloC 1-6 alkyl, haloC 1-6 alkoxy, cyano, -S-C 1-6 alkyl, -SO-C 1-6 alkyl, -SO 2 -C 1-6 alkyl, -COR 7 , - CONR 7 R 8 , -NR 7 R 8 , -NR 7 COC 1-6 alkyl, -NR 7 SO 2 C 1-6 alkyl, C 1-6 alkyl-NR 7 R 8 , -OCONR 7 R 8 , - NR 7 CO 2 R 8 or -SO 2 NR 7 R 8 groups; R 4 and R 5 independently represent C 1-6 alkyl, or R 4 and R 5 together with the carbon atom to which they are attached may together form a C 3-8 cycloalkyl group; R 6 represents halogen, C 1-6 alkyl, C 3-8 cycloalkyl, C 1-6 alkoxy, halOC 1-6 alkyl or halOC 1-6 alkoxy; s represents an integer from 0 to 4; R 7 and R 3 independently represent hydrogen, C 1-6 alkyl or C