And We made Sulaiman ( Solomon ) to understand ( the case ) , and to each of them We gave Hukman ( right judgement of the affairs and Prophethood ) and knowledge . And We subjected the mountains and the birds to glorify Our Praises along with Dawud ( David ) , And it was We Who were the doers ( of all these things ) .