William Shakespeare said this quote

This fellow is wise enough to play the fool;And to do that well craves a kind of wit:He must observe their mood on whom he jests,The quality of persons, and the time,And, like the haggard, check at every featherThat comes before his eye. This is a practiseAs full of labour as a wise man's artFor folly that he wisely shows is fit;But wise men, folly-fall'n, quite taint their wit.