US consumer prices post largest gain in nine months; underlying inflation slowing