{"raw_statement":[{"iden":"problem statement","content":"We have a grid with $2$ horizontal rows and $2$ vertical columns.  \nEach of the squares is black or white, and there are at least $2$ black squares.  \nThe colors of the squares are given to you as strings $S_1$ and $S_2$, as follows.\n\n*   If the $j$\\-th character of $S_i$ is `#`, the square at the $i$\\-th row from the top and $j$\\-th column from the left is black.\n*   If the $j$\\-th character of $S_i$ is `.`, the square at the $i$\\-th row from the top and $j$\\-th column from the left is white.\n\nYou can travel between two different black squares if and only if they share a side.  \nDetermine whether it is possible to travel from every black square to every black square (directly or indirectly) by only passing black squares."},{"iden":"constraints","content":"*   Each of $S_1$ and $S_2$ is a string with two characters consisting of `#` and `.`.\n*   $S_1$ and $S_2$ have two or more `#`s in total."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$S_1$\n$S_2$"},{"iden":"sample input 1","content":"##\n.#"},{"iden":"sample output 1","content":"Yes\n\nIt is possible to directly travel between the top-left and top-right black squares and between top-right and bottom-right squares.  \nThese two moves enable us to travel from every black square to every black square, so the answer is `Yes`."},{"iden":"sample input 2","content":".#\n#."},{"iden":"sample output 2","content":"No\n\nIt is impossible to travel between the top-right and bottom-left black squares, so the answer is `No`."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}