Compounds of Formulas Ia and Ib, and including stereoisomers, geometric isomers, tautomers, solvates, metabolites and pharmaceutically acceptable salts thereof, are useful for inhibiting lipid kinases including PI3K, and for treating disorders such as cancer mediated by lipid kinases. Methods of using compounds of Formula Ia and Ib for in vitro, in situ, and in vivo diagnosis, prevention or treatment of such disorders in mammalian cells, or associated pathological conditions, are disclosed.