S&P 500, Nasdaq end lower but Dow jumps on mixed earnings