What country borders both Pakistan and Iran?

Afghanistan.