Sorohue wants to open the Ion Express in SCS City. There are stations arranged in an grid. Station is in the -th row from the top and the -th column from the left.
Assign an integer from to to each station. Connect each pair of horizontally or vertically adjacent stations with one rail labeled + or -.
A route starts at station , moves only right or down, and ends at station . Its energy is the value of the expression obtained by concatenating the integers at its stations and the operators on its rails in traversal order. There is no operator before the integer at the starting station.
There are types of trains, requiring energies . Assign the station integers and rail operators so that, for every , at least one route has energy exactly . All trains use the same assignment, and their routes may overlap.
The input is given in the following format:
If no valid assignment exists, print NO on the first line.
Otherwise, print YES on the first line, followed by:
A route that moves right times in the first row, down four times, and then right to the destination has energy . Taking provides all the required energies.
Every string must contain only + and -. If there are multiple solutions, print any of them. Do not print the routes themselves.
| 3 | 5 | ; is a multiple of (). |
| 4 | 17 | . |
| 5 | 21 | (). |
| 6 | 44 | No additional constraints. |