Bhagavad Gita 3.28
तत्त्ववित्तु महाबाहो गुणकर्मविभागयोः ।
गुणा गुणेषु वर्तन्त इति मत्वा न सज्जते ॥ २८ ॥
But he, O mighty-armed, who knoweth the essence of the divisions of the qualities and functions, holding that "the qualities move amid the qualities," is not attached.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.