Maximum Valid Split Positions II
Try removing each element in turn, then count the cut points where the gcd of the left part equals the gcd of the right part.
Try removing each element in turn, then count the cut points where the gcd of the left part equals the gcd of the right part.