The story
First appearing in English (in this form) in 1698, in Algernon Sidney's Discourses Concerning Government. Translation of a maxim found in Ancient Greek and Roman literature; equivalent proverbs are found in many languages, such as Hungarian and Italian.
Etymology from Wiktionary, CC BY-SA 4.0.