A compound having the formula (1) or (2): ** Formula ** or a pharmaceutically acceptable salt thereof, wherein: ring E is an optionally substituted aryl or heteroaryl; A1 and A2 are independently a C1-5 heterocycle, quinolinyl, or a heteroaryl selected from the group ** Formula ** wherein any heterocycle of A1 and A2 can be optionally substituted with -LC (O) R10; B is benzothiazolyl, quinolinyl or isoquinolinyl, each of which is optionally substituted with 1-3 groups of R6; X1, X2, X3 and X4 are independently CR7 or N; Y is phenyl, thiazolyl, pyridinyl, pyridazinyl, pyrimidinyl or pyrazinyl; Z is aryl, C1-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 R6 groups; R1 and R5 are independently H or C1-6 alkyl; R2 and R3 are H; R4 is hydrogen, halo, cyano, C1-6 alkoxy, -C (O) CH3, or C1-6 alkyl optionally substituted with halo, alkoxy or amino; R6 is hydrogen, halo, C1-6 alkoxy, C1-6 alkyl, C2-6 alkenyl or C2-6 alkynyl, each of which may be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; CN, -L-W, NR8R9, -L-C (O) R10, -L-C (O) OR10, -LC (O) NR8R9, OR10; -L-S (O) 2R10 or-L-S (O) 2NR8R9; R7 is H, halo, C1-6 alkoxy, cyano, C1-6 alkyl optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; NR8R9, -L-C (O) R10, -L-C (O) NR8R9, OR10; -L-S (O) 2R10 or -L-S (O) 2NR8R9; R8 and R9 are independently H, -L-W, or C1-6 alkyl, C2-6 alkenyl or C2-6 alkynyl, each of which may be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; or R8 and R9 together with the atoms to which they are attached can form a ring; R10 is H, -L-W, or C1-6 alkyl, C2-6 alkenyl or C2-6 alkynyl, each of which may be optionally substituted with halo, amino, hydroxyl, alkoxy or cyano; L is a bond or (CR2) 1-4 wherein R is H or C1-6 alkyl; W is C3-7 cycloalkyl, C1-5 heterocycle, aryl or heteroaryl; m is 0-4; n is 0-3; p is 0-2; and the N-oxide derivatives thereof.Un compu