A compound of the formula (I):wherein Ring A is substituted or unsubstituted pyridine ring, Y is substituted or unsubstituted alkyl, etc., R1 is hydrogen, or substituted or unsubstituted alkyl, etc., R2 is hydrogen or lower alkyl, R3 is lower alkyl, Z is1) -D1-Q [D1 is direct bond or divalent C1-8 hydrocarbon, etc., Q is hydroxy, carboxyl, etc.], or2) -D2M-E-W [D2 is direct bond or divalent C1-8 hydrocarbon, etc., M is oxygen, sulfur, etc., E is direct bond or divalent C1-8 hydrocarbon, etc., W is hydroxyl, carboxyl, etc.],or a prodrug thereof, or a pharmaceutically acceptable salt of the same, which exhibits acyl-CoA: cholesterol acyl transferase (ACAT) inhibitory activity, and is useful as an agent for treatment of hyperlipidemia and atherosclerosis.