The invention relates to compounds of formula wherein R1, R2, R3, R4, X and Y are as defined herein and to pharmaceutically active acid addition salts thereof. The compounds can be used for the treatment of Alzheimer's disease, cerebral amyloid angiopathy, hereditary cerebral hemorrhage with amyloidosis, Dutch-type (HCHWA-D), multi-infarct dementia, dementia pugilistica or Down syndrome.