Modify your former program so that it outputs ”Yes” when the numbers are consecutive, regardless of whether they go up or down. For example, both ”2,3,4,5,6,-1” and ”10,9,8,7,-1” should now result in ”Yes”.