There is provided a compound of the formula (I′):wherein x is a nitrogen or CRx, Rx is a hydrogen, etc., R1 is an optionally substituted hydrocarbon group, etc., R2 is an optionally substituted hydrocarbon group, etc., ring A is 5- to 8-membered heterocyclic ring, etc., and each of Y1, Y2 and Y3 is an optionally substituted carbon or a nitrogen, etc. or a salt thereof or a prodrug thereof, which have CRF receptor antagonistic activity and use thereof.