The present invention relates to compounds of formula (I), as well as pharmaceutically acceptable salts thereof can be used in the form of pharmaceutical compositions, wherein A, B, R1, R2, R3, R4, R5, n, m and p have the significance defined herein.