You are given two boards $a$ and $b$, each board has $1$ row and $n$ columns. Each cell in both boards can either be a digit from $0$ to $9$ or an empty cell represented by a dot character .
.
You can perform the following operations on board $a$ zero or more times:
2..3
, you can make it 2.3.
.2..3
, you can make it .2.3
.Your task is to check if the board $a$ can be converted to the board $b$ after applying as many operations as needed.
The first line of the input contains a single integer $T$ ($1 \le T \le 250$), the number of test cases.
The first line of each test case contains a single integer $n$ ($1 \le n \le 10^5$), the number of columns of boards $a$ and $b$.
The next two lines contain the boards $a$ and $b$ respectively. Each board is represented by a string of length $n$ consisting of digits and dots.
The total sum of $n$ over all test cases doesn't exceed $2 \times 10^6$.
For each test case, print a single line with yes
if board $a$ can be converted to board $b$. Otherwise, print no
. The output is case insensitive.
Input | Output |
---|---|
4 3 2.3 23. 3 2.5 23. 9 012..3.1. 01..231.. 9 012..301. 01..23..1 Copy
|
yes no yes no Copy
|