The following 2n−12n-12n−1 lines contains 2m−12m-12m−1 characters each, denoting the symbols in the grid. ".\texttt{.}." denotes an empty cell, "" denotes a blocked cell, "+\texttt{+}+" denotes a plus sign, and "-\texttt{-}-" denotes a minus sign. The next line contains nnn integers rir_iri (−109≤ri≤109-10^9 \leq r_i \leq 10^9−109≤ri≤109), denoting the clues for each row on the right of the grid. The next line contains mmm integers cic_ici (−109≤ci≤109-10^9 \leq c_i \leq 10^9−109≤ci≤109), denoting the clues for each column on the bottom of the grid.
3 3
.-.+.
+#+#-
.-.+.
+#+#+
.-.-.
5 1 -5
14 16 -1
YES
7 3 1
2 9 8
5 4 6