Valmiki Ramayana Kishkindha Kanda Sarga 18 Shloka 15
Original Shlokaसूक्ष्मः परमदुरजेयस्सतां धर्मः प्लवङ्गम। हृदिस्थस्सर्वभूतानामात्मा वेद शुभाशुभम्4.18.15।।
1 source checked for this shloka
प्लवङ्गम O monkey, सताम् for the pious ones, धर्मः dharma, सूक्ष्मः is subtle, परमदुरजेयः extremely difficult to understand, सर्वभूतानाम् for all beings, हृदिस्थः in the heart, आत्मा self, शुभाशुभम् good and bad, वेद knows.
'O monkey dharma is very subtle. It is extremely difficult to understand. Installed in the hearts of all living beings the self knows good and evil (soul is the witness of good and evil).