I heard the Messenger of Allah ﷺ say: If there are three men in a village or in the desert among whom prayer is not offered (in congregation), the devil has got the mastery over them. So observe (prayer) in congregation), for the wolf eats only the straggling animal. Sa'ib said: By the word Jama'ah he meant saying prayer in company or in congregation. (Using translation from Abū Dāʾūd 547)
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ مَا مِنْ ثَلَاثَةٍ فِي قَرْيَةٍ لَا يُؤَذَّنُ وَلَا تُقَامُ فِيهِمُ الصَّلَاةُ إِلَّا اسْتَحْوَذَ عَلَيْهِمُ الشَّيْطَانُ فَعَلَيْكَ بِالْجَمَاعَةِ فَإِنَّ الذِّئْبَ يَأْكُلُ الْقَاصِيَةَ