Micah 6:5

The prophet Micah does not specify: what exactly did Balaam answer Balak? Rashi says that it refers to Numbers 23:8, “How can I be angry if G-d is not angry?” Ibn Ezra says it refers to Numbers 22:18, where Balaam said that he could only say what G-d instructed him to say, which is what led him to bless Israel rather than curse them.