Pak-Afghan tensions costly for both nations: COAS