Dhammapada · 6.1
Nidhīnaṃva pavattāraṃ, yaṃ passe vajjadassinaṃ;Niggayhavādiṃ medhāviṃ, tādisaṃ paṇḍitaṃ bhaje;Tādisaṃ bhajamānassa, seyyo hoti na pāpiyo.
Nidhinamva pavattaram, yam passe vajjadassinam; Niggayhavadim medhavim, tadisam panditam bhaje; Tadisam bhajamanassa, seyyo hoti na papiyo.
Should you find a wise reprover who points out your faults as one who reveals hidden treasure, keep company with such a one. For one who keeps such company things become better, not worse.
— Dhammapada 6.1
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.