Please answer a question about the following article about Tajikistan:

As a landlocked country Tajikistan has no ports and the majority of transportation is via roads, air, and rail. In recent years Tajikistan has pursued agreements with Iran and Pakistan to gain port access in those countries via Afghanistan. In 2009, an agreement was made between Tajikistan, Pakistan, and Afghanistan to improve and build a 1,300 km (810 mi) highway and rail system connecting the three countries to Pakistan's ports. The proposed route would go through the Gorno-Badakhshan Autonomous Province in the eastern part of the country. And in 2012, the presidents of Tajikistan, Afghanistan, and Iran signed an agreement to construct roads and railways as well as oil, gas, and water pipelines to connect the three countries.

What countries did Tajikistan agree with to build a highway and a rail way?
Tajikistan, Pakistan, and Afghanistan