A compound of the formula (I): wherein each symbol is as defined in the DESCRIPTION, or a pharmaceutically acceptable salt thereof has a superior Notch signal transduction inhibitory action, and is useful for preventing or treating various diseases involving Notch signal transduction.