Problem Statement
There are NN cards with an integer written on each side. Card ii (1 \leq i \leq N)(1≤i≤N) has an integer a_iai written on the front and an integer b_ibi written on the back.
You may choose whether to place each card with its front or back side visible.
Determine if you can place the cards so that the sum of the visible integers exactly equals SS. If possible, find a placement of the cards to realize it.
Constraints
-
1 \leq N \leq 1001≤N≤100
-
1 \leq S \leq 100001≤S≤10000
-
1 \leq a_i, b_i \leq 100 \, (1 \leq i \leq N)1≤ai,bi≤100(1≤i≤N)
-
All values in the input are integers.
Input
The input is given from Standard Input in the following format:
NNSSa_1a1b_1b1\vdots⋮a_NaNb_NbN
Output
First, print Yes if you can make the sum of the visible integers exactly equal SS, and No otherwise, followed by a newline.
Additionally, if such a placement is possible, print a string of length NN consisting of H and T that represents the placement of the cards to realize it.
The ii-th (1 \leq i \leq N)(1≤i≤N) character should be H if the ii-th card should be placed with its front side visible, and T with its back.
If there are multiple possible placements to realize the sum, printing any of them is accepted.