{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eWe have two figures \u003cvar\u003e\\(S\\)\u003c/var\u003e and \u003cvar\u003e\\(T\\)\u003c/var\u003e on a two-dimensional grid with square cells.\u003c/p\u003e\r\n\u003cp\u003e\u003cvar\u003e\\(S\\)\u003c/var\u003e lies within a grid with \u003cvar\u003e\\(N\\)\u003c/var\u003e rows and \u003cvar\u003e\\(N\\)\u003c/var\u003e columns, and consists of the cells where \u003cvar\u003e\\(S_{i,j}\\)\u003c/var\u003e is \u003ccode\u003e#\u003c/code\u003e.\u003cbr\u003e\r\n\u003cvar\u003e\\(T\\)\u003c/var\u003e lies within the same grid with \u003cvar\u003e\\(N\\)\u003c/var\u003e rows and \u003cvar\u003e\\(N\\)\u003c/var\u003e columns, and consists of the cells where \u003cvar\u003e\\(T_{i,j}\\)\u003c/var\u003e is \u003ccode\u003e#\u003c/code\u003e.\u003c/p\u003e\r\n\u003cp\u003eDetermine whether it is possible to exactly match \u003cvar\u003e\\(S\\)\u003c/var\u003e and \u003cvar\u003e\\(T\\)\u003c/var\u003e by \u003cvar\u003e\\(90\\)\u003c/var\u003e-degree rotations and translations.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1 \\leq N \\leq 200\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003eEach of \u003cvar\u003e\\(S\\)\u003c/var\u003e and \u003cvar\u003e\\(T\\)\u003c/var\u003e consists of \u003ccode\u003e#\u003c/code\u003e and \u003ccode\u003e.\u003c/code\u003e.\u003c/li\u003e\r\n\u003cli\u003eEach of \u003cvar\u003e\\(S\\)\u003c/var\u003e and \u003cvar\u003e\\(T\\)\u003c/var\u003e contains at least one \u003ccode\u003e#\u003c/code\u003e.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(N\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(S_{1,1}S_{1,2}\\ldots S_{1,N}\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(\\vdots\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(S_{N,1}S_{N,2}\\ldots S_{N,N}\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(T_{1,1}T_{1,2}\\ldots T_{1,N}\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(\\vdots\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(T_{N,1}T_{N,2}\\ldots T_{N,N}\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003ePrint \u003ccode\u003eYes\u003c/code\u003e if it is possible to exactly match \u003cvar\u003e\\(S\\)\u003c/var\u003e and \u003cvar\u003e\\(T\\)\u003c/var\u003e by \u003cvar\u003e\\(90\\)\u003c/var\u003e-degree rotations and translations, and \u003ccode\u003eNo\u003c/code\u003e otherwise.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n.....\r\n..#..\r\n.###.\r\n.....\r\n.....\r\n.....\r\n.....\r\n....#\r\n...##\r\n....#\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\u003cp\u003eWe can match \u003cvar\u003e\\(S\\)\u003c/var\u003e to \u003cvar\u003e\\(T\\)\u003c/var\u003e by rotating it \u003cvar\u003e\\(90\\)\u003c/var\u003e-degrees counter-clockwise and translating it.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n#####\r\n##..#\r\n#..##\r\n#####\r\n.....\r\n#####\r\n#..##\r\n##..#\r\n#####\r\n.....\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNo\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\u003cp\u003eIt is impossible to match them by \u003cvar\u003e\\(90\\)\u003c/var\u003e-degree rotations and translations.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 3","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n#...\r\n..#.\r\n..#.\r\n....\r\n#...\r\n#...\r\n..#.\r\n....\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\u003cp\u003eEach of \u003cvar\u003e\\(S\\)\u003c/var\u003e and \u003cvar\u003e\\(T\\)\u003c/var\u003e may not be connected.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 4","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n#...\r\n.##.\r\n..#.\r\n....\r\n##..\r\n#...\r\n..#.\r\n....\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNo\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\u003cp\u003eNote 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.\u003c/p\u003e\u003c/section\u003e\r\n"}}]}