Pakistan, Afghanistan agree to work for betterment of relations