Alice and Bob play a coin game. Alice moves first.
N coins lie in a row, each showing heads or tails. On a turn a player picks a block of consecutive coins and flips every coin in that block. The rightmost coin of the block must show heads before the flip, so it goes from heads to tails. A player who cannot pick such a block loses.
The initial arrangement of the coins is given. Decide whether Alice wins when both players play optimally.
The first line contains an integer T (1≤T≤100), the number of test cases.
Each of the next T lines contains a string S (3≤∣S∣≤15). Every character of S is H or T, where H means the coin shows heads and T means it shows tails.
Print one line for each test case.
If Alice wins, print YES p k. Here p is the position of the rightmost coin she flips on her first move, counting from 1, and k is the number of coins that move flips. When several first moves win, choose the one with the smallest p, and among those the one with the smallest k.
If Alice cannot win, print NO.