Input costs rise at fastest rate for nearly four years