The present invention provides a compound represented by the formula (I):
wherein
E is an optionally substituted cyclic group;
D is a carbonyl group or a sulfonyl group;
A is CH or N;
ring P is an optionally further substituted 5- to 7-membered ring;
ring Q is an optionally further substituted 5- to 7-membered nonaromatic ring; and
ring R is an optionally further substituted and optionally condensed 5- to 7-membered nonaromatic ring,
or a salt thereof. The compound of the present invention has an ACC inhibitory activity, is useful for the prophylaxis or treatment of obesity, diabetes, hypertension, hyperlipidemia, cardiac failure, diabetic complications, metabolic syndrome, sarcopenia and the like, and has superior properties in the efficacy, duration of activity, specificity, low toxicity and the like.