A compound of a formula (IV) or a pharmaceutically acceptable salt thereof, wherein, one of R 4 and R 5 is H, and the other is selected from the group consisting of F, Cl, Br and I; the ring A is a 5 or 9 membered heteroaryl which is optionally substituted by a R group,; and wherein when the ring A is a 9 membered heteroaryl, the ring A is selected from: and when the ring A is a 5 membered heteroaryl, the ring A is selected from the group consisting of isothiazolyl, 1,2,4-thiadiazolyl, 1,3-dihydro-1H-pyrrole, each is optionally substituted by a R group, or the ring A is R 1 is selected from the group consisting of H, halogen, OH, NH 2 , CN, COOH, and -C(=O)NH 2 ; or is selected from the group consisting of C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl, 5-6 membered heterocycloalkyl, phenyl and 5-6 membered heteroaryl, wherein each is optionally substituted by one, two or three R groups, and wherein the "hetero" of the C 1-6 heteroalkyl, 5-6 membered heterocycloalkyl and 5-6 membered heteroaryl represents a heteroatom or a heteroatom group selected from the group consisting of -C(=O)NH-, -NH-, -C(=NH)-, -S(=O) 2 NH-, -S(=O)NH-, -O-, -S-, N, =O, =S, -C(=O)O-, -C(=O)-, -S(=O)- and -S(=O) 2 -; L 1 is selected from the group consisting of a single bond, -(CRR) 1-3 -, and -NH-; n is selected from 0, 1, 2 or 3; R is selected from the group consisting of H, F, Cl, Br, I, OH, NH 2 , and C(=O)NH 2 ; or is selected from the group consisting of C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl and C 3-6 cycloalkyl-NH-, wherein each is optionally substituted by one, two or three R' groups; R' is selected from the group consisting of H, F, Cl, Br, I, OH, CN, NH 2 , COOH, Me, Et, CF 3 , CHF 2 , CH 2 F, NHCH 3 and N(CH 3 ) 2 ; and in any one of the above cases, the number of the heteroatom or the heteroatom group is independently selected from 1, 2 or 3. one of R 4 and R 5 is H, and the other is selected from the group consisting of F, Cl, Br and I; the ring A is a 5 or 9 membered heteroaryl which is optionally substituted by a R group,; and wherein when the ring A is a 9 membered heteroaryl, the ring A is selected from: and when the ring A is a 5 membered heteroaryl, the ring A is selected from the group consisting of isothiazolyl, 1,2,4-thiadiazolyl, 1,3-dihydro-1H-pyrrole, each is optionally substituted by a R group, or the ring A is R 1 is selected from the group consisting of H, halogen, OH, NH 2 , CN, COOH, and -C(=O)NH 2 ; or is selected from the group consisting of C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl, 5-6 membered heterocycloalkyl, phenyl and 5-6 membered heteroaryl, wherein each is optionally substituted by one, two or three R groups, and wherein the "hetero" of the C 1-6 heteroalkyl, 5-6 membered heterocycloalkyl and 5-6 membered heteroaryl represents a heteroatom or a heteroatom group selected from the group consisting of -C(=O)NH-, -NH-, -C(=NH)-, -S(=O) 2 NH-, -S(=O)NH-, -O-, -S-, N, =O, =S, -C(=O)O-, -C(=O)-, -S(=O)- and -S(=O) 2 -; L 1 is selected from the group consisting of a single bond, -(CRR) 1-3 -, and -NH-; n is selected from 0, 1, 2 or 3; R is selected from the group consisting of H, F, Cl, Br, I, OH, NH 2 , and C(=O)NH 2 ; or is selected from the group consisting of C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl and C 3-6 cycloalkyl-NH-, wherein each is optionally substituted by one, two or three R' groups; R' is selected from the group consisting of H, F, Cl, Br, I, OH, CN, NH 2 , COOH, Me, Et, CF 3 , CHF 2 , CH 2 F, NHCH 3 and N(CH 3 ) 2 ; and in any one of the above cases, the number of the heteroatom or the heteroatom group is independently selected from 1, 2 or 3. <EOS>