HP Inc to cut up to 4,000 jobs over next three years