This invention provides a compound of the formula (I):a pharmaceutically acceptable salt or solvate thereof,whereinR1 is substituted or unsubstituted alkyl or the like,R2 is hydrogen or substituted or unsubstituted alkyl,Ring A is monocyclic or bicyclic aromatic heterocycle,R3 is substituted or unsubstituted aryl, substituted or unsubstituted heteroaryl or substituted or unsubstituted heterocycle,R4 is halogen, cyano, substituted or unsubstituted alkyl, substituted or unsubstituted cycloalkyl or the like,m is an integer between 0 and 2,n is an integer between 0 and 5,R is halogen, oxo, cyano, nitro, substituted or unsubstituted alkyl or the like, andp is an integer between 0 and 2as novel compounds having NPY Y5 antagonistic activity.