A compound represented by the formula (I)whereinring Cy1 is a 5-membered aromatic heterocycle optionally further substituted besides a group represented by -A-B,ring Cy2 is an optionally substituted benzene ring,ring Cy3 is an optionally substituted 5-membered aromatic heterocycle,ring Cy4 is an optionally substituted 6-membered aromatic ring,A is -CONRa- or -NRaCO-,Ra is a hydrogen atom or a substituent,B is a hydrogen atom or an optionally substituted C1-6 alkyl-group,X is an optionally substituted C1-2 alkylene, -Y-, -Y-CH2- or - CH2-Y-,Y is an oxygen atom, -NRb- or -S(O)m-,Rb is a hydrogen atom or a substituent, andm is 0, 1 or 2,provided thatN-methyl-4-[2-[3,4,5-trimethoxyphenyl)amino]-1,3-benzoxazol-7-yl]thiophene-2-carboxamide is excluded,or a salt thereof,has an agonistic action on GPR52, and is useful as an agent for the prophylaxis or treatment of schizophrenia and the like.