The present invention relates to compounds of formula (I) wherein Rl to R10, X, Y and n are as defined in the description and claims, and pharmaceutically acceptable salts and esters thereof. The compounds are useful for the treatment of diseases such as diabetes.