Disclosed is a compound which is useful in preventing and treating cardiac arrhythmia such as atrial fibrillation. A compound represented by formula (1) or a pharmaceutically acceptable salt of the same.In formula (1), ring X represents benzene or pyridine R1 represents an optionally substituted alkyl group R2 represents an optionally substituted aryl group, an optionally substituted heterocyclic group, an optionally substituted arylalkyl group or an optionally substituted heterocyclic group-substituted alkyl group R3, R4, R5, R6, R7, R8 and R9 represent each hydrogen or an alkyl group, provided that R3 and R5 may be bonded to each other to form, together with the carbon atom adjacent thereto, a cycloalkyl group and m represents 0 or 1.