Pixel Art

Pixel Art is a form of art that consist of creating images from small squares or pixels filled with a single color. It became very popular in the 80’s because of the limitations computers had to represent images, but it is popular even today among the retro lovers. It is very easy to reproduce this type of images when you have all the necessary colors. The challenge is to do it using only the primary colors: magenta, yellow and cyan. Fortunately, thanks to the theory of color we know that any color can be obtained by mixing the primary ones according to the following scheme: For example, red is obtained by mixing magenta and yellow; black, mixing the 3 primary colors; and white, leaving the paper unpainted. Input The program should read, from the standard input, the number of test cases that will follow, each on a different line. Each case is described using 3 numbers that indicate the amount of paint available for each primary color in the following order: magenta, yellow and cyan. Each paint unit allows you to fill a pixel of that color. Keep in mind that mixing colors will expend units of all primary colors involved. For example, to paint a red pixel you need to spend 1 magenta unit and 1 yellow unit. Next, there is the sequence of pixels describing the image. Each pixel is encoded with a capital letter indicating its color: magenta (M), yellow (Y), cyan (C), red (R), black (B), green (G), violet (V) and white (W). Every image will have between 1 and 100,000 pixels. Output For each test case the program will write a single line in the standard output. If the image can be completed with the available paints, the program will write ‘YES’ and the remaining units of magenta, yellow and cyan in that order. If the image cannot be completed, the program will write ‘NO’.

2/2 Sample Input 3 1 1 1 MCY 3 2 1 MYWWCR 1 1 1 RV Sample Output YES 0 0 0 YES 1 0 0 NO