A chain consists of k = 4n links. Of these, are gold links and the remaining are silver links. Two robbers want to divide the chain fairly, so that both the gold and the silver links are split equally. Write a program that finds the minimum number of cuts needed to divide the chain in this way.
The program first reads the number of links , followed by numbers, each being or . Here, represents a silver link and represents a gold link. All numbers are given in a single line, separated by spaces.
The program should output the minimum number of cuts and the indices of the links between which the cuts are made. The first cut must be as close as possible to the beginning of the chain. n < 10000.
Example 1