From Sahih Muslim (Hadith 1885):
Ubayy b. Ka'b said:Allah's Messenger (ﷺ) said: O Abu' al-Mundhir, do you know the verse from the Book of Allah which, according to you, is the greatest? I said: Allah and His Apostle (ﷺ) know best. He again said: Abu'l-Mundhir, do you know the verse from the Book of Allah which, according to you, is the greatest? I said: Allah, there is no god but He, the Living, the Eternal. Thereupon he struck me on my breast and said: May knowledge be pleasant for you, O Abu'l-Mundhir
Reference: Muslim 1885