A compound of formula Ic: ** Formula ** or a pharmaceutically acceptable salt thereof, wherein R1 is -ZAR4, in which each ZA is independently a branched or linear C1-6 aliphatic chain or link in which up to Two ZA carbon units are optionally and independently substituted with - CO-, -CS-, -CONRA-, -CONRANRA-, -CO2- -OCO-, -NRACO2-, -O-, -NRACONRA-, -OCONRA- , -NRANRA-, - NRACO-, -S-, -SO-, -SO2- -NRA-, -SO2NRA-, -NRASO2- or -NRASO2NRA-, Each R4 is independently RA, halogen, -OH, -NH2, 20 -NO2, -CN or -OCF3, Each RA is independently hydrogen, an aliphatic, a cycloaliphatic, heterocycloaliphatic, an aryl or a heteroaryl; Each R2 is independently -ZBR5, in which each ZB is independently a branched or linear C1-6 aliphatic chain or chain optionally substituted with halogen, -OH, cyano, C3-10 cycloaliphatic, 3-10 membered heterocycloaliphatic, monocyclic aryl or 8-12 membered bicyclic, 4-15 membered heteroaryl, or combinations thereof, in which up to two ZB carbon units are optionally and independently substituted with -CO-, -CS-, -CONRB-, - CONRBNRB-, -CO2-, -OCO-, - NRBCO2-, -O-, -NRBCONRB-, -OCONRB-, -NRBNRB-, -NRBCO-, -S-, -SO-, -SO2-, -NRB- , -SO2NRB-, -NRBSO2- or - NRBSO2NRB-, Each R5 is independently RB, halogen, -OH, -NH2, -NO2, -CN, -CF3 or -OCF3, Each RB is independently hydrogen, a C3-10 aliphatic , a C3-10 cycloaliphatic, a 3-10 membered heterocycloaliphatic, an 8-12 membered monocyclic or bicyclic aryl, or a 4-15 membered heteroaryl; or, any two adjacent R2 groups together with the atoms to which they are attached form a carbocycle or a heterocycle; Ring A is a 3-7 membered monocyclic ring that has 0-3 heteroatoms selected from N, O and S; Ring B is a group having the formula Ia: ** Formula ** or a pharmaceutically acceptable salt thereof, in which p is 0-2, Each R3 and R'3 is independently -ZCR6, in which each ZC is independently a branched or linear C1-6 aliphatic chain or link optionally substituted with halogen, hydroxy, or combinations thereof, wherein