Ecclesiastes 7:15-20
15 In my vain life I have seen everything. There is a righteous man who perishes in his righteousness, and there is a wicked man who prolongs his life in his evildoing. 16 Be not overly righteous, and do not make yourself too wise. Why should you destroy yourself? 17 Be not overly wicked, neither be a fool. Why should you die before your time? 18 It is good that you should take hold of this, and from that withhold not your hand, for the one who fears God shall come out from both of them.
19 Wisdom gives strength to the wise man more than ten rulers who are in a city.
20 Surely there is not a righteous man on earth who does good and never sins.