{"problem":{"name":"Shapes","description":{"content":"We have two figures $S$ and $T$ on a two-dimensional grid with square cells. $S$ lies within a grid with $N$ rows and $N$ columns, and consists of the cells where $S_{i,j}$ is `#`.   $T$ lies within t","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc218_c"},"statements":[{"statement_type":"Markdown","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.\n\n## Constraints\n\n*   $1 \\leq N \\leq 200$\n*   Each of $S$ and $T$ consists of `#` and `.`.\n*   Each of $S$ and $T$ contains at least one `#`.\n\n## Input\n\nInput 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}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc218_c","tags":[],"sample_group":[["5\n.....\n..#..\n.###.\n.....\n.....\n.....\n.....\n....#\n...##\n....#","Yes\n\nWe can match $S$ to $T$ by rotating it $90$\\-degrees counter-clockwise and translating it."],["5\n#####\n##..#\n#..##\n#####\n.....\n#####\n#..##\n##..#\n#####\n.....","No\n\nIt is impossible to match them by $90$\\-degree rotations and translations."],["4\n#...\n..#.\n..#.\n....\n#...\n#...\n..#.\n....","Yes\n\nEach of $S$ and $T$ may not be connected."],["4\n#...\n.##.\n..#.\n....\n##..\n#...\n..#.\n....","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."]],"created_at":"2026-03-03 11:01:14"}}