A compound of formula wherein A is selected from the group consisting of A1 and A2 X 1 and X 2 are independently C or N; R 1 is H or is selected from the group consisting of -NR 3 R 4, -C NR 3 R 5, - NR 3 C R 6 and -C OR 7; R 2 is H or is selected from the group consisting of -C OR 3 and -C NR 3 R 6; or R 2 is absent when X 1 or X 2 is N; R 3 is H or -(C 1 -C 6)alkyl; R 4 is H or -(C 1 -C 6)alkyl; R 5 is H or is selected from the group consisting of -(C 1 -C 6)alkyl, -(C 1- C 6)alkylene-NR A R B, cycloalkyl, heterocycloalkyl optionally substituted by one or more -(C 1 -C 6)alkyl, and -(C 1- C 6)alkylene-heterocycloalkyl, wherein said heterocycloalkyl is optionally substituted by one or more groups selected from -(C 1 -C 6)alkyl, -C -(C 1- C 6)alkyl and -SO 2 -(C 1- C 6)alkyl; R 6 is selected from the group consisting of -(C 1- C 6)alkylene-NR 3 R 4 and -(C 1- C 6)alkylene-heterocycloalkyl, wherein said heterocycloalkyl is optionally substituted by one or more -(C 1 -C 6)alkyl; R 7 is H or is selected from the group consisting of -(C 1 -C 6)alkyl, -(C 1- C 6)alkylene-NR 3 R 4 and -(C 1- C 6)alkylene-heterocycloalkyl, wherein said heterocycloalkyl is optionally substituted by one or more -(C 1 -C 6)alkyl; R A is H or is selected from the group consisting of -(C 1- C 6)alkyl and -(C 1 -C 6)hydroxyalkyl; R B is selected from the group consisting of -(C 1 -C 6)alkyl, -(C 1- C 6)alkylene-C O-(C 1- C 6)alkyl, heterocycloalkyl and -(C 1 -C 6)hydroxyalkyl; R 8 is selected from the group consisting of aryl and heteroaryl, wherein said aryl is optionally substituted by one or more groups selected from halogen atoms, -(C 1- C 6)alkyl and -(C 1 -C 4)haloalkyl, and said heteroaryl is optionally substituted by one or more groups selected from -(C 1 -C 6)alkyl, halogen atoms and -O-(C 1 -C 6)alkyl; and pharmaceutically acceptable salts thereof. A is selected from the group consisting of A1 and A2 X 1 and X 2 are independently C or N; R 1 is H or is selected from the group consisting of -NR 3 R 4, -C NR 3 R 5, - NR 3 C R 6 and -C OR 7; R 2 is H or is selected from the group consisting of -C OR 3 and -C NR 3 R 6; or R 2 is absent when X 1 or X 2 is N; R 3 is H or -(C 1 -C 6)alkyl; R 4 is H or -(C 1 -C 6)alkyl; R 5 is H or is selected from the group consisting of -(C 1 -C 6)alkyl, -(C 1- C 6)alkylene-NR A R B, cycloalkyl, heterocycloalkyl optionally substituted by one or more -(C 1 -C 6)alkyl, and -(C 1- C 6)alkylene-heterocycloalkyl, wherein said heterocycloalkyl is optionally substituted by one or more groups selected from -(C 1 -C 6)alkyl, -C -(C 1- C 6)alkyl and -SO 2 -(C 1- C 6)alkyl; R 6 is selected from the group consisting of -(C 1- C 6)alkylene-NR 3 R 4 and -(C 1- C 6)alkylene-heterocycloalkyl, wherein said heterocycloalkyl is optionally substituted by one or more -(C 1 -C 6)alkyl; R 7 is H or is selected from the group consisting of -(C 1 -C 6)alkyl, -(C 1- C 6)alkylene-NR 3 R 4 and -(C 1- C 6)alkylene-heterocycloalkyl, wherein said heterocycloalkyl is optionally substituted by one or more -(C 1 -C 6)alkyl; R A is H or is selected from the group consisting of -(C 1- C 6)alkyl and -(C 1 -C 6)hydroxyalkyl; R B is selected from the group consisting of -(C 1 -C 6)alkyl, -(C 1- C 6)alkylene-C O-(C 1- C 6)alkyl, heterocycloalkyl and -(C 1 -C 6)hydroxyalkyl; R 8 is selected from the group consisting of aryl and heteroaryl, wherein said aryl is optionally substituted by one or more groups selected from halogen atoms, -(C 1- C 6)alkyl and -(C 1 -C 4)haloalkyl, and said heteroaryl is optionally substituted by one or more groups selected from -(C 1 -C 6)alkyl, halogen atoms and -O-(C 1 -C 6)alkyl; and pharmaceutically acceptable salts thereof.