Dhammapada · 15.11
Bālasaṅgatacārī hi, dīghamaddhāna socati;Dukkho bālehi saṃvāso, amitteneva sabbadā;Dhīro ca sukhasaṃvāso, ñātīnaṃva samāgamo.
Balasangatacari hi, dighamaddhana socati; Dukkho balehi samvaso, amitteneva sabbada; Dhiro ca sukhasamvaso, natinamva samagamo.
One who walks with fools grieves for a long time. Company with fools is suffering, like being always with an enemy. Company with the wise is happy, like meeting with kinsmen.
— Dhammapada 15.11
Source: Pali text from the Khuddaka Nikāya of the Pali Canon (oldest extant Buddhist scripture, compiled c. 3rd century BCE). Public-domain English readings drawn from F. Max Müller's translation in Sacred Books of the East, Vol X (1881) and the Buddhist Publication Society's freely-licensed Acharya Buddharakkhita rendering.