U.S. factory activity cools; cost pressures mounting