Compute the sum and product of an array of integers.
