Bhagavad Gita · 3.28
तत्त्ववित्तु महाबाहो गुणकर्मविभागयोः।गुणा गुणेषु वर्तन्त इति मत्वा न सज्जते॥
tattva-vit tu mahā-bāho guṇa-karma-vibhāgayoḥ guṇā guṇeṣhu vartanta iti matvā na sajjate
But one who knows the truth about the two divisions of the modes of nature and their actions, O mighty-armed one, knowing that the modes interact with the modes, does not become attached.
— Bhagavad Gita 3.28
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)