Question: What countries had Tajikistan been working with to use ports?
Sentence: In recent years Tajikistan has pursued agreements with Iran and Pakistan to gain port access in those countries via Afghanistan.
Answer in sentence: yes