This invention provides compounds of formula I-A or I-B: wherein HY, G1, G2, R2, R12, W1, W2, n, and Ring A are as described in the specification. The compounds are inhibitors of PI3K and/or mTor and are thus useful for treating proliferative, inflammatory, or cardiovascular disorders.