Proverbs 21:11

New American Standard Bible (NASB)
When the scoffer is punished, the [c]naive becomes wise;
But when the wise is instructed, he receives knowledge.

Read Proverbs 21:11 in other translations