The invention relates to chemical compounds, or pharmaceutically acceptable salts thereof of the formula (I):which penetrate the blood brain barrier, inhibit the formation and accumulation of beta-amyloid, and are useful in the treatment of neurodegenerative diseases, particularly Alzheimers disease. Further, the compounds of the present invention inhibit certain kinases, thereby being useful for the treatment of cancers of the central nervous system.