The present invention provides a compound having a muscle cell or adipocyte differentiation regulating action, useful for the prophylaxis or treatment of diseases such as diabetes, obesity, dyslipidemia and the like, and the like, and having superior efficacy.The present invention provides a compound represented by the formula:wherein each symbol is as defined in the description, or a salt thereof.