US inflation rises sharply in August as petrol costs climb