There are two types of blocks, sizes $$$1\times 2$$$ and $$$1\times 3$$$, and there is a long slot of $$$2\times n$$$ where you can rotate the blocks (or not) and then put them into this slot. Once the blocks are placed in the slot, they must not extend beyond the boundaries of the slot.
If there are some positions in the slot that need to be covered by blocks and only once, and some positions that cannot be covered by blocks, can the coverage requirement be satisfied with both types of blocks?
In the first line, an integer $$$t(1\le t\le 10^4)$$$, representing the number of data sets.
For each group of data:
On the first line, an integer $$$n(3\le n\le 10^5)$$$, representing the length of the slot.
For the next two lines, a binary string of length $$$n$$$ each, if the string is $$$0$$$ at that position, it means that this place should not be covered by blocks; otherwise, it means that this place should be covered by blocks.
It is guaranteed that the sum of $$$n$$$ within the same test point does not exceed $$$10^5$$$.
For each set of data, output a line "YES" if some placement scheme exists that would fulfill the requirement; otherwise, output a line "NO".
You can output "YES" and "NO" in any case form (e.g., the strings "yES", "yes", and "Yes" will all be treated as positive answers).
4 3 010 111 3 001 111 5 01101 11111 8 01001101 11011011
NO YES YES NO
| Name |
|---|


