There are three types of chameleons inhabiting New Waterloo Island - red, green, and blue. When two
chameleons of different colors meet, they both change their color to the third color and breed
Input Specification
The first line of input contains three integers
Output Specification
Output YES
if the communist revolution can happen, and NO
otherwise. If you've outputted YES
, in the
next line print R
, G
, B
. The symbols R
, G
, B
correspond to red, green, and
blue chameleons, and a string R B
would mean a meeting between red and blue chameleons. If there are
several ways to set up these encounters, print any one of them. However, the largest allowed
Sample Input 1
3 2 2
2
Sample Output 1
YES
2
B G
B G
Explanation for Sample 1
In the first test, we're setting up two encounters between green and blue chameleons. The quantities of
chameleons are going to change as follows:
Sample Input 2
17 7 4
3
Sample Output 2
NO
Comments