Oil holds near five-month high on US output cuts and inventories