There is disclosed a compound of formula (I'), wherein the ring A is 5-8-membered heterocyclic ring, R1, R2 and Y1-Y3 have values provided in the claims, or a salt thereof. Said compounds have CRF receptor antagonistic activity and are applicable at the diseases treatment caused by CRF receptor.