There are provided compounds represented by the following general formula (I) or pharmaceutically acceptable salts of thereof, which have a superior monoacylglycerol acyltransferase 2 inhibitory action:whereinRing A represents a partially saturated heteroaryl group, an aryl group or a heteroaryl group, RB represents a C4-18 alkyl group, a C3-8 cycloalkyl group, a partially saturated aryl group, an aryl group, or the following formula (II):whereinV represents the formula -CR11R12-, -CO-, -CO-O-, or -CO-NH-,W represents a single bond or a C1-3 alkylene group, andRing B represents a C3-8 cycloalkyl group, a C3-8 cycloalkenyl group, a partially saturated heteroaryl group, a saturated heterocyclyl group, an aryl group, or a heteroaryl group,Y represents a nitrogen atom or the formula N+(RF),RF represents a C1-4 alkyl group, andm and n, which may be the same or different, each represent an integer of 0 or 1.