Task
Ovidiu is a fan of pixel art and is particularly interested in RGB grids.
An RGB grid consists of a rectangular grid where every cell is coloured either red, green, or blue.
He also figured out that, in order to create a masterpiece, the following rules have to be followed:
- The grid has rows and columns.
- There are exactly red cells, green cells and blue cells.
- There are no cells that share a side and have the same colour.
However, Ovidiu isn't able to create one himself, and he asked for your help.
Can you tell if a masterpiece exists and, if so, produce one?
Input data
The input file consists of a single line containing integers , , , , .
Output data
If a masterpiece exists, the output file must contain lines, the first line must consist of the string YES
and the following lines must contain a string of length , consisting of characters R
, G
and B
, representing a masterpiece.
If there are more than one possible masterpiecee, you may print any of them.
If no masterpiece exists, the output file must consist of a single line containing only the string NO
.
Constraints and clarifications
- .
- .
- .
- .
# | Score | Constraints |
---|---|---|
1 | 0 | Examples. |
2 | 17 | . |
3 | 21 | . |
4 | 23 | . |
5 | 39 | No additional limitations. |
Example 1
stdin
2 3 2 2 2
stdout
YES
RBG
BGR
Explanation
In the first sample case, one possible masterpiece is depicted below.
Note that there are red cells, green cells and blue cells. Also, no two adjacent cells have the same colors.
Example 2
stdin
3 3 1 6 2
stdout
NO
Explanation
In the second sample case, there are no masterpieces satisfying the requirements.