Provided is a compound represented by formula (I) that has an antiviral effect. In formula (I): A1 represents CR1AR1B, S or O; A2 represents CR2AR2B, S or O; A3 represents CR3AR3B, S or O; A4 represents CR4AR4B, S or O [wherein the ring-constituting atoms consisting of A1, A2, A3, A4, a nitrogen atom adjacent to A1 and a carbon atom adjacent to A4 include one or two hetero atoms; R1A and R1B independently represent hydrogen, halogen, alkyl, etc.; R2A and R2B independently represent hydrogen, halogen, alkyl, etc.; R3A and R3B independently represent hydrogen, halogen, alkyl, etc.; R4A and R4B independently represent hydrogen, halogen, alkyl, etc.; R3A and R3B may together form a non-aromatic carbon ring or a non-aromatic heteroring; X represents CH2, S or O; R1's independently represent halogen, hydroxy, etc.; m is an integer of 0-2; and n is an integer of 1-2].