A compound of formula: wherein: ring A is a C 6-10 aryl ring; ring B is pyridinyl; R 1 and R 2 are each independently hydrogen, nitrile, C 1-4 alkoxy, halogen, nitrile, C 1-4 alkyl, halo-substituted-C 1-4 alkyl, C 3-6 cycloalkyl or halo-substituted-C 1-4 alkoxy; R 3 and R 4 are each independently hydrogen, nitrile, CD 3, C 3-6 cycloalkyl, C 4-6 heterocycle, C 1-4 alkoxy, halogen, C 1-4 alkyl, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl or halo-substituted-C 1-4 alkoxy; n is 0, 1 or 2; R 5 is -NR 7 R 8, -OR 9 or R 10; R 6 is hydrogen, hydroxy, C 1-2 alkyl, C 1-2 alkoxy, hydroxy-substituted-C 1-2 alkyl, halogen or amino; m is 0, 1 or 2; R 7 is hydrogen, C 1-6 alkyl, C 3-6 cycloalkyl, a fully or partially saturated 4 to 7-membered heterocycle, wherein said 4 to 7-membered heterocycle is optionally substituted with 1 to 4 substituents each independently selected from halogen, hydroxy, C 1-4 alkyl, C 1-4 alkoxy, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkoxy, oxo, nitrile, C 3-6 cycloalkyl, C 4-6 heterocycle, NHR 11, -C -R 13, -C NHR 11, C 1-3 alkyl-C NHR 11 and-C O-R 12; R 8 is hydrogen or C 1-4 alkyl; R 9 is hydrogen, C 3-6 cycloalkyl or a fully or partially saturated 4 to 7-membered heterocycle each ring is optionally substituted with one to four substituents each independently selected from halogen, hydroxy, C 1-4 alkyl, C 1-4 alkoxy, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1- 4 alkyl, halo-substituted-C 1-4 alkoxy, oxo, nitrile, C 3-6 cycloalkyl, C 4-6 heterocycle, NHR 11, -C -R 13, -C NHR 11, C 1-3 alkyl-C NHR 11 and -C O-R 12; R 10 is a fully or partially saturated 4 to 10-membered heterocycle optionally substituted with one to four substituents each independently selected from halogen, hydroxy, C 1-4 alkyl, C 1-4 alkoxy, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkoxy, oxo, nitrile, C 3-6 cycloalkyl, C 4-6 heterocycle, NHR 11, -C -R 13, -C NHR 11, C 1-3 alkyl-C NHR 11, -C C 1-3 alkyl-NHR 11 and -C O-R 12,wherein said C 3-6 cycloalkyl and C 4-6 heterocycle are optionally substituted with 1 to 3 substituents each independently selected from hydroxy, halogen, amino, C 1-4 alkyl, halo-substituted-C 1-4 alkyl and hydroxy-substituted-C 1-4 alkyl; R 11 is hydrogen, C 1-4 alkyl or C 0-3 alkyl-C O-R 14; R 12 is hydrogen, C 1-4 alkyl or C 1-3 alkyl-C -NHR 14; R 13 is C 1-4 alkyl, wherein said alkyl is optionally substituted with amino; and R 14 is hydrogen or C 1-4 alkyl; or a pharmaceutically acceptable salt thereof. ring A is a C 6-10 aryl ring; ring B is pyridinyl; R 1 and R 2 are each independently hydrogen, nitrile, C 1-4 alkoxy, halogen, nitrile, C 1-4 alkyl, halo-substituted-C 1-4 alkyl, C 3-6 cycloalkyl or halo-substituted-C 1-4 alkoxy; R 3 and R 4 are each independently hydrogen, nitrile, CD 3, C 3-6 cycloalkyl, C 4-6 heterocycle, C 1-4 alkoxy, halogen, C 1-4 alkyl, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl or halo-substituted-C 1-4 alkoxy; n is 0, 1 or 2; R 5 is -NR 7 R 8, -OR 9 or R 10; R 6 is hydrogen, hydroxy, C 1-2 alkyl, C 1-2 alkoxy, hydroxy-substituted-C 1-2 alkyl, halogen or amino; m is 0, 1 or 2; R 7 is hydrogen, C 1-6 alkyl, C 3-6 cycloalkyl, a fully or partially saturated 4 to 7-membered heterocycle, wherein said 4 to 7-membered heterocycle is optionally substituted with 1 to 4 substituents each independently selected from halogen, hydroxy, C 1-4 alkyl, C 1-4 alkoxy, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkoxy, oxo, nitrile, C 3-6 cycloalkyl, C 4-6 heterocycle, NHR 11, -C -R 13, -C NHR 11, C 1-3 alkyl-C NHR 11 and-C O-R 12; R 8 is hydrogen or C 1-4 alkyl; R 9 is hydrogen, C 3-6 cycloalkyl or a fully or partially saturated 4 to 7-membered heterocycle each ring is optionally substituted with one to four substituents each independently selected from halogen, hydroxy, C 1-4 alkyl, C 1-4 alkoxy, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1- 4 alkyl, halo-substituted-C 1-4 alkoxy, oxo, nitrile, C 3-6 cycloalkyl, C 4-6 heterocycle, NHR 11, -C -R 13, -C NHR 11, C 1-3 alkyl-C NHR 11 and -C O-R 12; R 10 is a fully or partially saturated 4 to 10-membered heterocycle optionally substituted with one to four substituents each independently selected from halogen, hydroxy, C 1-4 alkyl, C 1-4 alkoxy, halo-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkoxy, oxo, nitrile, C 3-6 cycloalkyl, C 4-6 heterocycle, NHR 11, -C -R 13, -C NHR 11, C 1-3 alkyl-C NHR 11, -C C 1-3 alkyl-NHR 11 and -C O-R 12,wherein said C 3-6 cycloalkyl and C 4-6 heterocycle are optionally substituted with 1 to 3 substituents each independently selected from hydroxy, halogen, amino, C 1-4 alkyl, halo-substituted-C 1-4 alkyl and hydroxy-substituted-C 1-4 alkyl; R 11 is hydrogen, C 1-4 alkyl or C 0-3 alkyl-C O-R 14; R 12 is hydrogen, C 1-4 alkyl or C 1-3 alkyl-C -NHR 14; R 13 is C 1-4 alkyl, wherein said alkyl is optionally substituted with amino; and R 14 is hydrogen or C 1-4 alkyl;