US stocks have closed mostly lower as investors digested inflation data for last month and monitored developments in the Middle East.