Captain, soldier martyred in exchange of fire with terrorists