{"raw_statement":[{"iden":"problem statement","content":"There are $N$ cards with an integer written on each side. Card $i$ $(1 \\leq i \\leq N)$ has an integer $a_i$ written on the front and an integer $b_i$ written on the back.\nYou may choose whether to place each card with its front or back side visible.\nDetermine if you can place the cards so that the sum of the visible integers exactly equals $S$. If possible, find a placement of the cards to realize it."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 100$\n*   $1 \\leq S \\leq 10000$\n*   $1 \\leq a_i, b_i \\leq 100 \\, (1 \\leq i \\leq N)$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $S$\n$a_1$ $b_1$\n$\\vdots$\n$a_N$ $b_N$"},{"iden":"sample input 1","content":"3 11\n1 4\n2 3\n5 7"},{"iden":"sample output 1","content":"Yes\nTHH\n\nFor example, the following placements make the sum of the visible integers exactly equal $S (= 11)$:\n\n*   Place the $1$\\-st card with its front side visible, $2$\\-nd with its back, and $3$\\-rd with its back.\n*   Place the $1$\\-st card with its back side visible, $2$\\-nd with its front, and $3$\\-rd with its front.\n\nTherefore, outputs like `HTT` and `THH` are accepted."},{"iden":"sample input 2","content":"5 25\n2 8\n9 3\n4 11\n5 1\n12 6"},{"iden":"sample output 2","content":"No\n\nYou cannot place the cards so that the sum of the visible integers exactly equals $S (= 25)$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}