The present invention relates to the compounds of formula (I) Wherein HetAr is heteroatomic five yuan or the six membered heteroaryl that N, O or S are selected from containing one, two or three R1 is hydrogen, low alkyl group, the low alkyl group being optionally substituted by halogen, halogen or lower alkoxy R2 is the low alkyl group being optionally substituted by halogen, by one or two is selected from-CH2-C3-6- the naphthenic base that the substituent group of low alkyl group or halogen being optionally substituted by halogen replaces, or the low-grade alkenyl being optionally substituted by halogen Low alkyl group, low alkyl group, halogen, C3-6- naphthenic base or the low alkyl group being optionally substituted by a hydroxyl group that R3 is hydrogen, is optionally substituted by halogen N is 1 or 2 For n=2, R1 can be independently from each other Y is CH or N Or it is related to its pharmaceutical activity acid-addition salts, its racemic mixture or corresponding enantiomer and/or optical isomer and/or stereoisomer. The compound can be used for treating Alzheimer disease, cerebral amyloid angiopathy, Hereditary cerebral hemorrhage with amyloidosis, Dutch type (HCHWA-D), Dementia with Multiple Brain Infarction, boxers dementia or Down syndrome.