Wall Street ended flat on Tuesday after President Donald Trump said the US would quit the Iran nuclear deal.