Compounds of the formula I or II: or pharmaceutically acceptable salts thereof, wherein R1 is a group of formula (a), (b), (c), (d), (e), or (f): and m, n, X, Y, m, n, X, Y, R1, R 2, R 3, R 4, R b and R c are as defined herein. Also disclosed are methods of making the compounds and using the compounds for treatment of inflammatory diseases such as arthritis.