Bhagavad Gita 4.17
Chapter 4: Knowledge and the offering of action
कर्मणो ह्यपि बोद्धव्यं बोद्धव्यं च विकर्मणः ।
अकर्मणश्च बोद्धव्यं गहना कर्मणो गतिः ॥ १७ ॥
It is needful to discriminate action, to discriminate unlawful action, and to discriminate inaction; mysterious is the path of action.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.