Valmiki Ramayana Kishkindha Kanda Sarga 18 Shloka 21
Original Shlokaन हि धर्मविरुद्धस्य लोकवृत्तादपेयुषः। दण्डादन्यत्र पश्यामि निग्रहं हरियूथप4.18.21।
1 source checked for this shloka
हरियूथप O lord of monkeys, धर्मविरुद्धस्य for one who acts against dharma, लोकवृत्तात् from the accepted practice of the world, अपेयुषः for one who swerved, दण्डात् from punishing, अन्यत्र other than this, निग्रहम् preventing, न पश्यामि हि I have not seen.
'O lord of monkeys I do not see any other way of controlling a person excepting punishing the one who has acted against dharma and swerved from the accepted code of conduct.