{"raw_statement":[{"iden":"problem statement","content":"We have two figures $S$ and $T$ on a two-dimensional grid with square cells.\n$S$ lies within a grid with $N$ rows and $N$ columns, and consists of the cells where $S_{i,j}$ is `#`.  \n$T$ lies within the same grid with $N$ rows and $N$ columns, and consists of the cells where $T_{i,j}$ is `#`.\nDetermine whether it is possible to exactly match $S$ and $T$ by $90$\\-degree rotations and translations."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 200$\n*   Each of $S$ and $T$ consists of `#` and `.`.\n*   Each of $S$ and $T$ contains at least one `#`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S_{1,1}S_{1,2}\\ldots S_{1,N}$\n$\\vdots$\n$S_{N,1}S_{N,2}\\ldots S_{N,N}$\n$T_{1,1}T_{1,2}\\ldots T_{1,N}$\n$\\vdots$\n$T_{N,1}T_{N,2}\\ldots T_{N,N}$"},{"iden":"sample input 1","content":"5\n.....\n..#..\n.###.\n.....\n.....\n.....\n.....\n....#\n...##\n....#"},{"iden":"sample output 1","content":"Yes\n\nWe can match $S$ to $T$ by rotating it $90$\\-degrees counter-clockwise and translating it."},{"iden":"sample input 2","content":"5\n#####\n##..#\n#..##\n#####\n.....\n#####\n#..##\n##..#\n#####\n....."},{"iden":"sample output 2","content":"No\n\nIt is impossible to match them by $90$\\-degree rotations and translations."},{"iden":"sample input 3","content":"4\n#...\n..#.\n..#.\n....\n#...\n#...\n..#.\n...."},{"iden":"sample output 3","content":"Yes\n\nEach of $S$ and $T$ may not be connected."},{"iden":"sample input 4","content":"4\n#...\n.##.\n..#.\n....\n##..\n#...\n..#.\n...."},{"iden":"sample output 4","content":"No\n\nNote that it is not allowed to rotate or translate just a part of a figure; it is only allowed to rotate or translate a whole figure."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}