Sophocles said this quote

Wisdom outweighs any wealth.