Sunan Abi Dawud, Book 30, Hadith 16 (Abu Dawud 3920)

Narrated Urwah ibn Amir al-Qurashi:

When taking omens was mentioned in the presence of the Prophet (ﷺ), he said: The best type is the good omen, and it does not turn back a Muslim. If one of you sees anything he dislikes, he should say: O Allah, no one brings good things except Thee, and no one averts evil things except Thee and there is no might and power but in Allah.