#abc307c. [abc307_c]Ideal Sheet

[abc307_c]Ideal Sheet

Problem Statement

Takahashi has two sheets AA and BB, each composed of black squares and transparent squares, and an infinitely large sheet CC composed of transparent squares.
There is also an ideal sheet XX for Takahashi composed of black squares and transparent squares.

The sizes of sheets AA, BB, and XX are HAH_A rows times\\times WAW_A columns, HBH_B rows times\\times WBW_B columns, and HXH_X rows times\\times WXW_X columns, respectively.
The squares of sheet AA are represented by HAH_A strings of length WAW_A, A1,A2,ldots,AHAA_1, A_2, \\ldots, A_{H_A} consisting of . and #.
If the jj-th character (1leqjleqWA)(1\\leq j\\leq W_A) of AiA_i (1leqileqHA)(1\\leq i\\leq H_A) is ., the square at the ii-th row from the top and jj-th column from the left is transparent; if it is #, that square is black.
Similarly, the squares of sheets BB and XX are represented by HBH_B strings of length WBW_B, B1,B2,ldots,BHBB_1, B_2, \\ldots, B_{H_B}, and HXH_X strings of length WXW_X, X1,X2,ldots,XHXX_1, X_2, \\ldots, X_{H_X}, respectively.

Takahashi's goal is to create sheet XX using all black squares in sheets AA and BB by following the steps below with sheets AA, BB, and CC.

  1. Paste sheets AA and BB onto sheet CC along the grid. Each sheet can be pasted anywhere by translating it, but it cannot be cut or rotated.
  2. Cut out an HXtimesWXH_X\\times W_X area from sheet CC along the grid. Here, a square of the cut-out sheet will be black if a black square of sheet AA or BB is pasted there, and transparent otherwise.

Determine whether Takahashi can achieve his goal by appropriately choosing the positions where the sheets are pasted and the area to cut out, that is, whether he can satisfy both of the following conditions.

  • The cut-out sheet includes all black squares of sheets AA and BB. The black squares of sheets AA and BB may overlap on the cut-out sheet.
  • The cut-out sheet coincides sheet XX without rotating or flipping.

Constraints

  • 1leqHA,WA,HB,WB,HX,WXleq101\\leq H_A, W_A, H_B, W_B, H_X, W_X\\leq 10
  • HA,WA,HB,WB,HX,WXH_A, W_A, H_B, W_B, H_X, W_X are integers.
  • AiA_i is a string of length WAW_A consisting of . and #.
  • BiB_i is a string of length WBW_B consisting of . and #.
  • XiX_i is a string of length WXW_X consisting of . and #.
  • Sheets AA, BB, and XX each contain at least one black square.

Input

The input is given from Standard Input in the following format:

HAH_A WAW_A A1A_1 A2A_2 vdots\\vdots AHAA_{H_A} HBH_B WBW_B B1B_1 B2B_2 vdots\\vdots BHBB_{H_B} HXH_X WXW_X X1X_1 X2X_2 vdots\\vdots XHXX_{H_X}

Output

If Takahashi can achieve the goal described in the problem statement, print Yes; otherwise, print No.


Sample Input 1

3 5
#.#..
.....
.#...
2 2
#.
.#
5 3
...
#.#
.#.
.#.
...

Sample Output 1

Yes

First, paste sheet AA onto sheet CC, as shown in the figure below.

 $\\vdots$

.......
.#.#...
cdots\\cdots.......cdots\\cdots ..#....
.......
vdots\\vdots

Next, paste sheet BB so that its top-left corner aligns with that of sheet AA, as shown in the figure below.

 $\\vdots$

.......
.#.#...
cdots\\cdots..#....cdots\\cdots ..#....
.......
vdots\\vdots

Now, cut out a 5times35\\times 3 area with the square in the first row and second column of the range illustrated above as the top-left corner, as shown in the figure below.

...
#.#
.#.
.#.
...

This includes all black squares of sheets AA and BB and matches sheet XX, satisfying the conditions.

Therefore, print Yes.


Sample Input 2

2 2
#.
.#
2 2
#.
.#
2 2
##
##

Sample Output 2

No

Note that sheets AA and BB may not be rotated or flipped when pasting them.


Sample Input 3

1 1
#
1 2
##
1 1
#

Sample Output 3

No

No matter how you paste or cut, you cannot cut out a sheet that includes all black squares of sheet BB, so you cannot satisfy the first condition. Therefore, print No.


Sample Input 4

3 3
###
...
...
3 3
#..
#..
#..
3 3
..#
..#
###

Sample Output 4

Yes