|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||512 MB||3||1||1||100.000%|
Zenyk wants to play football, and n − 1 friends join him. All players have skill level — an integer between 1 and 10 000.
Players want to choose a referee and then divide into two teams such that each player is either the referee or a member of one of the teams, and the sums of skills of players in both teams are the same. So that will be a fair game.
Unfortunately all of them forgot their own skill levels. But each player remembers if it’s possible to divide into teams when he is a referee.
Find such skill values that satisfy all conditions. If several possible answers exist print any of them.
The first line contains one integer n (3 ≤ n ≤ 50).
The second line contains a string of length n. The i-th character of this string equals “Y” if it’s possible to divide players into teams if i-th player is a referee, and “N” otherwise.
In the first line, print “YES” if at least one possible set of values exists, and “NO” otherwise. If the answer is “YES”, print n integers — the corresponding values. These values should be between 1 and 10 000. If several possible answers exist, print any of them.
YES 3 1 2 3