The present invention provides a compound of formula I: and pharmaceutically acceptable salts thereof, wherein X, R1, R2, R3, R4, R5, L1, L2, m, and n, are as described in the specification. Such compounds are inhibitors of VPS34 and thus useful for treating proliferative, inflammatory, or cardiovascular disorders.