A compound having Formula or: or a pharmaceutically acceptable salt thereof, wherein: ring E is an optionally substituted aryl or heteroaryl; A 1 and A 2 are independently a C 1-5 heterocycle, quinolinyl, or a heteroaryl selected from the group wherein any heterocycle of A 1 and A 2 can be optionally substituted with -LC R 10; B is benzothiazolyl, quinolinyl or isoquinolinyl, each of which is optionally substituted with 1-3 R 6 groups; X 1, X 2, X 3 and X 4 are independently CR 7 or N; Y is phenyl, thiazolyl, pyridinyl, pyridazinyl, pyrimidinyl or pyrazinyl; Z is aryl, C 1-5 heterocycle, or a 5-6 membered heteroaryl containing 1-2 heteroatoms selected from N, O and S; each Y and Z are optionally substituted with 1-3 R 6 groups; R 1 and R 5 are independently H or C 1-6 alkyl; R 2 and R 3 are H; R 4 is hydrogen, halo, cyano, C 1-6 alkoxy, -C CH 3,or a C 1-6 alkyl optionally substituted with halo, alkoxy or amino; R 6 is hydrogen, halo, C 1-6 alkoxy, C 1-6 alkyl, C 2-6 alkenyl or C 2-6 alkynyl, each of which can be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; CN, -L-W, NR 8 R 9, -L-C R 10, -L-C OR 10, -L-C NR 8 R 9, OR 10; -L-S 2 R 10 or-L-S 2 NR 8 R 9; R 7 is H, halo, C 1-6 alkoxy, cyano, C 1-6 alkyl optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; NR 8 R 9, -L-C R 10, -L-C NR 8 R 9, OR 10; -L-S 2 R 10 or -L-S 2 NR 8 R 9; R 8 and R 9 are independently H, -L-W, or C 1-6 alkyl, C 2-6 alkenyl or C 2-6 alkynyl, each of which may be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; or R 8 and R 9 together with the atoms to which they are attached may form a ring; R 10 is H, -L-W, or C 1-6 alkyl, C 2-6 alkenyl or C 2-6 alkynyl, each of which may be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; L is a bond or (CR 2) 1-4 wherein R is H or C 1-6 alkyl; W is C 3-7 cycloalkyl, C 1-5 heterocycle, aryl or heteroaryl; m is 0-4; n is 0-3; p is 0-2; and the N-oxide derivatives thereof. ring E is an optionally substituted aryl or heteroaryl; A 1 and A 2 are independently a C 1-5 heterocycle, quinolinyl, or a heteroaryl selected from the group wherein any heterocycle of A 1 and A 2 can be optionally substituted with -LC R 10; B is benzothiazolyl, quinolinyl or isoquinolinyl, each of which is optionally substituted with 1-3 R 6 groups; X 1, X 2, X 3 and X 4 are independently CR 7 or N; Y is phenyl, thiazolyl, pyridinyl, pyridazinyl, pyrimidinyl or pyrazinyl; Z is aryl, C 1-5 heterocycle, or a 5-6 membered heteroaryl containing 1-2 heteroatoms selected from N, O and S; each Y and Z are optionally substituted with 1-3 R 6 groups; R 1 and R 5 are independently H or C 1-6 alkyl; R 2 and R 3 are H; R 4 is hydrogen, halo, cyano, C 1-6 alkoxy, -C CH 3,or a C 1-6 alkyl optionally substituted with halo, alkoxy or amino; R 6 is hydrogen, halo, C 1-6 alkoxy, C 1-6 alkyl, C 2-6 alkenyl or C 2-6 alkynyl, each of which can be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; CN, -L-W, NR 8 R 9, -L-C R 10, -L-C OR 10, -L-C NR 8 R 9, OR 10; -L-S 2 R 10 or-L-S 2 NR 8 R 9; R 7 is H, halo, C 1-6 alkoxy, cyano, C 1-6 alkyl optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; NR 8 R 9, -L-C R 10, -L-C NR 8 R 9, OR 10; -L-S 2 R 10 or -L-S 2 NR 8 R 9; R 8 and R 9 are independently H, -L-W, or C 1-6 alkyl, C 2-6 alkenyl or C 2-6 alkynyl, each of which may be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; or R 8 and R 9 together with the atoms to which they are attached may form a ring; R 10 is H, -L-W, or C 1-6 alkyl, C 2-6 alkenyl or C 2-6 alkynyl, each of which may be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; L is a bond or (CR 2) 1-4 wherein R is H or C 1-6 alkyl; W is C 3-7 cycloalkyl, C 1-5 heterocycle, aryl or heteroaryl; m is 0-4; n is 0-3; p is 0-2; and the N-oxide derivatives thereof.