Disclosed is a novel compound having an NPY Y5 receptor antagonistic activity. A compound represented by the formula: a pharmaceutically acceptable salt or solvate thereof, wherein R 1 is optionally substituted lower alkyl or the like, R 2 and R 8 are each independently hydrogen or lower alkyl, X is optionally substituted lower alkylene or the like, Y is -OCONR 7 - or the like, R 7 is hydrogen, lower alkyl or the like, Z is optionally substituted carbocyclyl or the like, W is optionally substituted alkylene or the like.