This invention provides compounds of formula (IA-a) or (IB-a) and subsets thereof: wherein Z, HY, R1, R2, G1 W, n, and A and subsets thereof are as described in the specification. The compounds are inhibitors of PI3K and are thus useful for treating proliferative, inflammatory, or cardiovascular disorders.