Naomi has learnt about Red-Black trees, now it's time to learn about White-Black trees. She is reading an algorithms book. Some pages contain pictures of trees, but the edges of the trees faded out through all these years. According to the text, each of these edges should be either white or black.
Naomi noticed that each vertex has two integers written beside it. She guessed that the first integer is the number of white edges incident to the vertex, and the second is the number of black edges incident to the vertex.
Naomi recreated all the pictures. Can you do that?
The first line contains an integer — the number of pictures to recreate ().
The following lines describe pictures. Each description starts with a line containing an integer — the number of vertices in the tree ().
The -th of the following lines of the picture description contains two integers and — two integers written beside the -th vertex of the tree: the number of white and black edges incident to the -th vertex ().
It is guaranteed that the sum of over all the pictures does not exceed .
Print blocks of output, the -th of which should contain the information about recreating picture .
In the first line of each block print "No
" if there is no way, and "Yes
" if there is at least one way to recreate the picture. If there is a way to recreate the picture of the tree, print additional lines, each of them containing two integers and a letter 'W
' for white or 'B
' for black: , and , defining an edge between vertices and of color (; is either 'W
' or 'B
').
If there are multiple ways to recreate a picture, you can print any of them. The edges of the tree can be printed in any order.