Dow, S&P 500 post record closing highs