To Solomon We inspired the ( right ) understanding of the matter : to each ( of them ) We gave Judgment and Knowledge ; it was Our power that made the hills and the birds celebrate Our praises , with David : it was We Who did ( all these things ) .