The invention provides novel compounds having the general formula I, wherein R1, R2, Y and W are as described herein, compositions including the compounds and methods of using the compounds. The compounds are useful in the treatment or prophylaxis of conditions that are associated with the activity of autotaxin and/or lysophosphatidic acid, such as renal, liver and inflammatory conditions, conditions of the nervous system, fibrotic diseases, and acute and chronic organ transplant rejection.