Time limit 1000/1000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Problem description
Bob participates to all programming competitions. That's why he has a lot of T-shirts. He devides all T-shirts to 3 types: W (whites), B (blacks) and C (color). He selects one of them every morning and wears it all day. He always wears only clean T-shirts so once he weared one he doesn't use it again before washing. His mother knows that T-shirts of different type can't be washed together. And also she knows that washing machine can hold K T-shirts so she washs only exactly K T-shirts at once (not less!). His mother does washing in the evening so Bob can wear washed T-shirts next day morning.
There is a strange fashion concept in their school. You can't wear a T-shirt of same type two days in a row and on same days of week (for example, 2 mondays). And this fashion works even on sundays.
Bob wants to know if he can dress in the fashion N days and if he can what is the correct sequence of T-shirts.
Input
Line 1: There are five integers N, W, B, C and K. 1 <= N, K <=1000, 0 <= W, B, C <= 1000.
Output
Write YES or NO on the first line of output. If answer to the Bob's question is YES then on the seocnd line write the correct sequence of T-shirts as shown in example.
Example
| stdin |
stdout |
2 5 0 4 1
|
YES
WC |
| 4 3 4 5 3 |
YES
WBCB |
| 10 3 2 1 3 |
NO |
Для отправки решений необходимо выполнить вход.
|