The present invention provides compounds of formula (Ia) and (Ib) which activate the IP receptor, processes for preparing them, pharmaceutical compositions comprising said compounds and uses thereof. Activating the IP receptor signaling pathway is useful to treat many forms of PAH, pulmonary fibrosis and exert beneficial effects in fibrotic conditions of various organs in animal models and in patients.