On necessary and sufficient conditions of the consensusability for second-order discrete multi-agent systems