A compound of formula or a pharmaceutically acceptable salt thereof: wherein X is a C 3 -C 7 cycloalkylene; W is independently -CH=CH- or -S-; W' is independently -CH=CH- or -S-, provided that at least one of W and W' is -CH=CH-; and Y, Z, Y' and Z' are each -N=; each R 1 and R 2 is independently -N(R 3)-C -R 4; each R 3 is independently hydrogen; each R 4 is independently C 1-6 alkyl, aryl, heteroaryl, aralkyl, heteroaralkyl, cycloalkyl, cycloalkylalkyl, heterocyclylalkyl, or heterocyclyl, each of which is substituted with 0-3 occurrences of R 5; each R 5 is independently C 1-6 alkyl, C 1-6 alkoxy, -O-C 1-6 alkyleneC 1-6 alkoxy, C 1-6 thioalkoxy, C 1-6 haloalkyl, C 3-7 cycloalkyl, C 3-7 cycloalkylalkyl, aryl, heteroaryl, aralkyl, heteroaralkyl, heterocyclylalkyl, heterocyclyl, cyano, halo, oxo, -OH, -OCF 3, -OCHF 2, -SO 2 -C 1-6 alkyl, -NO 2, - N(R 7)-C -C 1-6 alkyl, -C N(R 7) 2,-N(R 7)S 1-2 -C 1-6 alkyl, -S 2 N(R 7) 2, -N(R 7) 2,, -C 1-6 alkylene-N(R 7) 2, wherein said alkyl, C 1-6 alkoxy, -O-C 1-6 alkyleneC 1-6 alkoxy, C 1-6 thioalkoxy, C 1-6 haloalkyl, C 3-7 cycloalkyl, C 3-7 cycloalkylalkyl, aryl, heteroaryl, aralkyl, heteroaralkyl, heterocyclylalkyl, heterocyclyl, -SO 2 -C 1-6 alkyl, -NO 2, -N(R 7)-C -C 1-6 alkyl, -C N(R 7) 2, - N(R 7)S 1-2 -C 1-6 alkyl, -S 2 N(R 7) 2, -N(R 7) 2, or -C 1-6 alkylene-N(R 7) 2 is optionally substituted with 0-3 occurrences of R 8; or two adjacent R 5 moieties, taken together with the atoms to which they are attached form a cycloalkyl or heterocyclyl; each R 6 is independently hydrogen, fluoro, C 1-6 alkyl, -OH, -NH 2, -NH(CH 3), -N(CH 3) 2, or C 1-6 alkoxy; each R 7 is independently hydrogen or C 1-6 alkyl; each R 8 is independently halo, C 1-6 alkyl, C 1-6 haloalkyl, -OH, -N(R 7) 2, or C 1-6 alkoxy, -O-C 1-6 alkyleneC 1-6 alkoxy, CN, NO 2, -N(R 7)-C -C 1-6 alkyl, -C N(R 7) 2, -N(R 7)S 1-2 C 1-6 alkyl, or - S 2 N(R 7) 2; m is 0; n is 0; o is 1; and p is 1. X is a C 3 -C 7 cycloalkylene; W is independently -CH=CH- or -S-; W' is independently -CH=CH- or -S-, provided that at least one of W and W' is -CH=CH-; and Y, Z, Y' and Z' are each -N=; each R 1 and R 2 is independently -N(R 3)-C -R 4; each R 3 is independently hydrogen; each R 4 is independently C 1-6 alkyl, aryl, heteroaryl, aralkyl, heteroaralkyl, cycloalkyl, cycloalkylalkyl, heterocyclylalkyl, or heterocyclyl, each of which is substituted with 0-3 occurrences of R 5; each R 5 is independently C 1-6 alkyl, C 1-6 alkoxy, -O-C 1-6 alkyleneC 1-6 alkoxy, C 1-6 thioalkoxy, C 1-6 haloalkyl, C 3-7 cycloalkyl, C 3-7 cycloalkylalkyl, aryl, heteroaryl, aralkyl, heteroaralkyl, heterocyclylalkyl, heterocyclyl, cyano, halo, oxo, -OH, -OCF 3, -OCHF 2, -SO 2 -C 1-6 alkyl, -NO 2, - N(R 7)-C -C 1-6 alkyl, -C N(R 7) 2,-N(R 7)S 1-2 -C 1-6 alkyl, -S 2 N(R 7) 2, -N(R 7) 2,, -C 1-6 alkylene-N(R 7) 2, wherein said alkyl, C 1-6 alkoxy, -O-C 1-6 alkyleneC 1-6 alkoxy, C 1-6 thioalkoxy, C 1-6 haloalkyl, C 3-7 cycloalkyl, C 3-7 cycloalkylalkyl, aryl, heteroaryl, aralkyl, heteroaralkyl, heterocyclylalkyl, heterocyclyl, -SO 2 -C 1-6 alkyl, -NO 2, -N(R 7)-C -C 1-6 alkyl, -C N(R 7) 2, - N(R 7)S 1-2 -C 1-6 alkyl, -S 2 N(R 7) 2, -N(R 7) 2, or -C 1-6 alkylene-N(R 7) 2 is optionally substituted with 0-3 occurrences of R 8; or two adjacent R 5 moieties, taken together with the atoms to which they are attached form a cycloalkyl or heterocyclyl; each R 6 is independently hydrogen, fluoro, C 1-6 alkyl, -OH, -NH 2, -NH(CH 3), -N(CH 3) 2, or C 1-6 alkoxy; each R 7 is independently hydrogen or C 1-6 alkyl; each R 8 is independently halo, C 1-6 alkyl, C 1-6 haloalkyl, -OH, -N(R 7) 2, or C 1-6 alkoxy, -O-C 1-6 alkyleneC 1-6 alkoxy, CN, NO 2, -N(R 7)-C -C 1-6 alkyl, -C N(R 7) 2, -N(R 7)S 1-2 C 1-6 alkyl, or - S 2 N(R 7) 2; m is 0; n is 0; o is 1; and p is 1.