In meetings with president and PM, COAS vows to eliminate militants