A novel cyclic compound having a 4-pyridylalkylthiogroup having an (un)substituted amino group introduced thereinor a salt thereof. They are useful as a medicine. The cycliccompound is a compound represented by the following formula(1), which is useful for the treatment of diseases in whichangiogenesis participates. In the following formula (1), ringA represents a benzene ring or a 5- or 6-membered aromaticheterocycle optionally fused with a cycloalkane ring; Brepresents alkylene; R1 and R2 each represents H, (substituted)aryl, (substituted) heterocyclic group, etc.; R3 and R4 eachrepresents H, (substituted) alkyl, (substituted) cycloalkyl,-Z-R5, etc.; R5represents (substituted) alkyl, (substituted)aryl, (substituted) heterocyclic group, etc.; X and Y eachrepresents H, etc.; Z represents -CO-, -COO-, -CONR6-, -SO2-,etc.; R6 represents H, etc.; p is 0, 1, or 2; and q is 0 or1.(see formula 1)