The present invention provides a compound having excellent histone acetyltransferase inhibitory activity of EP300 and / or CREBBP, or a pharmacologically acceptable salt thereof. A compound represented by formula (1) or a pharmaceutically acceptable salt thereof. Embedded image (wherein, ring Q1, ring Q2, R1, R2, R3, and R4 in formula (1) have the same meanings as defined in the specification.)本発明は、優れたEP300および/またはCREBBPのヒストンアセチルトランスフェラーゼ阻害活性を有する化合物またはその薬理上許容される塩を提供するものである。 式(1)で表される化合物またはその薬理上許容される塩。【化1】(ここで、式(1)中の環Q1、環Q2、R1、R2、R3、およびR4は、それぞれ明細書中の定義と同義である。)