Pakistan, Afghanistan vow stronger ties, elimination of terrorism