Sunan an-Nasa'i, Book 8, Hadith 43 (Nasa'i 732)

It was narrated from Abu Qatadah that the Messenger of Allah (ﷺ) said:

"When any one of you enters the Masjid, let him pray two Rak'ahs before he sits down."