{"raw_statement":[{"iden":"statement","content":"The magician Alice is playing a game. Alice has N balls in a row, consists of red balls and blue balls. For convenience, the balls are numbered 1 to N from left to right. Her goal is to transform all balls into White by casting magic spells.\n\nIn a single spell, Alice can choose exactly R red balls and B blue balls at the same time, and then cast a spell on them, so all these R + B chosen balls will become white balls. However, there is a restriction: As some magical power may remains in the white balls, Alice cannot perform spells when there exists at least one white ball located between the leftmost chosen ball and the rightmost chosen ball.\n\nFor instance, if Alice balls 2, 6 and 7 have became white balls by previous spells, she cannot choose the set of balls {3, 8, 9} in a single spell as there exist a white ball numbered 5 between them. Similarly, single spell on balls {1, 3, 4}, {3, 4, 9} or {1, 9, 10} are invalid, while single spell on balls {3, 4, 5} or {8, 9, 10} are valid.\n\nAs Alice has spent more than hundred of years to achieve the goal and end up in failures, she is very frustrated. So, she promised that she will teach her magic skills to the one who can solve this frustrating game. \n\nNothing is more appealing than having an opportunity to learn magic! So you are trying to help Alice to achieve the goal.\n\nThe first line contains 3 positive integers, N, R and B. (R, B ≥ 1, 1 ≤ R + B ≤ N ≤ 105)\n\nThe second line contains a string S, consisting of N characters _R_ (red) and _B_ (blue). The i-th character is the color of the i-th ball from the left.\n\nIf it is impossible to achieve the goal, output _NO_ on the first line. \n\nOtherwise, output _YES_, followed by an integer S on the second line – the number of spells (S) you would like to cast. \n\nIn the next S lines, each should indicate a spell with R + B integers, representing the indices of the balls you have selected for this spell. You can output the indices in arbitrary order within the same line.\n\nPlease note that the spells should be printed in their *chronological order*. If there are more than one solution, you can output any of them.\n\nIn the first sample, the initial state is as follow:\n\n\n\nAfter casting the first spell:\n\n\n\nAnd after the second spell:\n\n\n\nAnd the final state:\n\n\n\nIn the second sample, the initial state is as follow:\n\n\n\nIn the third sample, the initial state is as follow:\n\n\n\nAfter casting the first spell:\n\n\n\nAnd at last:\n\n\n\n"},{"iden":"input","content":"The first line contains 3 positive integers, N, R and B. (R, B ≥ 1, 1 ≤ R + B ≤ N ≤ 105)The second line contains a string S, consisting of N characters _R_ (red) and _B_ (blue). The i-th character is the color of the i-th ball from the left."},{"iden":"output","content":"If it is impossible to achieve the goal, output _NO_ on the first line. Otherwise, output _YES_, followed by an integer S on the second line – the number of spells (S) you would like to cast. In the next S lines, each should indicate a spell with R + B integers, representing the indices of the balls you have selected for this spell. You can output the indices in arbitrary order within the same line.Please note that the spells should be printed in their *chronological order*. If there are more than one solution, you can output any of them."},{"iden":"examples","content":"Input6 1 1BBRBRROutputYES31 62 53 4Input8 1 2RBRBRBRBOutputNOInput10 2 3BRRRBBBRBBOutputYES21 2 3 9 104 5 6 7 8"},{"iden":"note","content":"In the first sample, the initial state is as follow:After casting the first spell:And after the second spell:And the final state:In the second sample, the initial state is as follow:In the third sample, the initial state is as follow:After casting the first spell:And at last:"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N, R, B \\in \\mathbb{Z}^+ $ with $ 1 \\leq R + B \\leq N \\leq 10^5 $.  \nLet $ S \\in \\{R, B\\}^N $ be a string representing the initial colors of $ N $ balls indexed from $ 1 $ to $ N $.  \n\nLet $ W \\subseteq \\{1, \\dots, N\\} $ be the set of white balls (initially empty).  \nA spell is a subset $ T \\subseteq \\{1, \\dots, N\\} \\setminus W $ such that:  \n- $ |T \\cap \\{i \\mid S[i] = R\\}| = R $,  \n- $ |T \\cap \\{i \\mid S[i] = B\\}| = B $,  \n- The interval $ [\\min T, \\max T] $ contains no element of $ W $ (i.e., no white ball lies strictly between the leftmost and rightmost chosen ball).  \n\n**Constraints**  \n1. $ R, B \\geq 1 $  \n2. $ R + B \\leq N \\leq 10^5 $  \n3. Each spell must satisfy the above conditions.  \n4. After all spells, $ W = \\{1, \\dots, N\\} $.  \n\n**Objective**  \nDetermine whether there exists a sequence of spells (in chronological order) such that all balls become white.  \n- If impossible: output `NO`.  \n- If possible: output `YES`, followed by the number of spells $ s $, then $ s $ lines each containing $ R + B $ distinct indices (in any order) of the balls selected in each spell.","simple_statement":"You are given N balls in a row, each red (R) or blue (B).  \nYou can cast a spell that turns exactly R red balls and B blue balls into white, but only if all chosen balls are consecutive with no white ball between them.  \nGoal: Turn all balls white.  \nOutput “NO” if impossible.  \nOtherwise, output “YES”, then the number of spells, then the indices of balls chosen in each spell (in order).  \nSpells must be applied in chronological order.  \nAny valid solution is accepted.","has_page_source":false}