시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB55101020.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.

예제 입력 1

4
YNNY

예제 출력 1

YES
3 1 2 3