A compound of the formula (I) having a binding activity to the cannabinoid type 2 receptor:
1
wherein R
1
is optionally substituted heterocyclic group or the like; R
2
and R
2
each is independently hydrogen or the like; m is an integer of 0 to 2; A is optionally substituted aromatic carbocyclic group or the like.