“A man entered the mosque when the Prophet (ﷺ) was delivering the sermon. He said: ‘Have you prayed?’ He said: ‘No.’ He said: ‘Then pray two Rak’ah.’”
Sunan Ibn Majah Book 5, Hadith 311