{"raw_statement":[{"iden":"statement","content":"The city of Fishtopia can be imagined as a grid of $4$ rows and an **odd** number of columns. It has two main villages; the first is located at the top-left cell $(1,1)$, people who stay there love fishing at the Tuna pond at the bottom-right cell $(4, n)$. The second village is located at $(4, 1)$ and its people love the Salmon pond at $(1, n)$.\n\nThe mayor of Fishtopia wants to place $k$ hotels in the city, each one occupying one cell. To allow people to enter the city from anywhere, hotels should not be placed on the border cells.\n\nA person can move from one cell to another if those cells are not occupied by hotels and share a side.\n\nCan you help the mayor place the hotels in a way such that there are equal number of shortest paths from each village to its preferred pond?"},{"iden":"input","content":"The first line of input contain two integers, $n$ and $k$ ($3 \\leq n \\leq 99$, $0 \\leq k \\leq 2\\times(n-2)$), $n$ is **odd**, the width of the city, and the number of hotels to be placed, respectively."},{"iden":"output","content":"Print \"_YES_\", if it is possible to place all the hotels in a way that satisfies the problem statement, otherwise print \"_NO_\".\n\nIf it is possible, print an extra $4$ lines that describe the city, each line should have $n$ characters, each of which is \"_#_\" if that cell has a hotel on it, or \"_._\" if not."},{"iden":"examples","content":"Input\n\n7 2\n\nOutput\n\nYES\n.......\n.#.....\n.#.....\n.......\n\nInput\n\n5 3\n\nOutput\n\nYES\n.....\n.###.\n.....\n....."}],"translated_statement":[{"iden":"statement","content":"鱼拓城可以被想象为一个 4 行、列数为 *奇数* 的网格。该城有两个主要村庄：第一个村庄位于左上角单元格 $(1, 1)$，那里的居民喜欢到右下角单元格 $(4, n)$ 的金枪鱼池钓鱼；第二个村庄位于 $(4, 1)$，其居民喜欢位于 $(1, n)$ 的鲑鱼池。\n\n鱼拓城的市长希望在城市中放置 $k$ 家酒店，每家酒店占据一个单元格。为了使人们可以从任何地方进入城市，酒店不能放置在边界单元格上。\n\n一个人可以从一个单元格移动到另一个单元格，当且仅当这两个单元格均未被酒店占据且共享一条边。\n\n你能否帮助市长安排酒店的位置，使得从每个村庄到其偏好池塘的最短路径数量相等？\n\n输入的第一行包含两个整数 $n$ 和 $k$（$3 lt.eq n lt.eq 99$，$0 lt.eq k lt.eq 2 times (n -2)$），其中 $n$ 为城市的宽度（奇数），$k$ 为要放置的酒店数量。\n\n如果存在一种放置所有酒店的方式满足题意，则输出 \"_YES_\"，否则输出 \"_NO_\"。\n\n如果可能，请额外输出 4 行，描述城市布局，每行包含 $n$ 个字符，若该单元格有酒店则为 \"_#_\"，否则为 \"_._\"。"},{"iden":"input","content":"输入的第一行包含两个整数 $n$ 和 $k$（$3 lt.eq n lt.eq 99$，$0 lt.eq k lt.eq 2 times (n -2)$），其中 $n$ 为城市的宽度（奇数），$k$ 为要放置的酒店数量。"},{"iden":"output","content":"如果存在一种放置所有酒店的方式满足题意，则输出 \"_YES_\"，否则输出 \"_NO_\"。如果可能，请额外输出 4 行，描述城市布局，每行包含 $n$ 个字符，若该单元格有酒店则为 \"_#_\"，否则为 \"_._\"。"},{"iden":"examples","content":"输入\n7 2\n输出\nYES\n........\n#......\n#......\n........\n\n输入\n5 3\n输出\nYES\n......\n###..\n.....\n....."}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be an odd integer with $ 3 \\leq n \\leq 99 $, representing the number of columns in a $ 4 \\times n $ grid.  \nLet $ k \\in \\mathbb{Z} $ with $ 0 \\leq k \\leq 2(n - 2) $, representing the number of hotels to place.  \n\nThe grid has rows $ \\{1, 2, 3, 4\\} $ and columns $ \\{1, \\dots, n\\} $.  \nBorder cells are those with row $ \\in \\{1, 4\\} $ or column $ \\in \\{1, n\\} $.  \nInternal (non-border) cells are those with row $ \\in \\{2, 3\\} $ and column $ \\in \\{2, \\dots, n-1\\} $.  \nThere are $ 2(n - 2) $ internal cells available for hotel placement.  \n\nTwo source-target pairs:  \n- Village A: $ (1, 1) \\to $ Pond A: $ (4, n) $  \n- Village B: $ (4, 1) \\to $ Pond B: $ (1, n) $  \n\nA path is a sequence of adjacent (sharing a side) non-hotel cells.  \nA shortest path moves only right and down (for A) or only right and up (for B).  \n\nLet $ P_A(S) $ denote the number of shortest paths from $ (1,1) $ to $ (4,n) $ in grid $ S $,  \nand $ P_B(S) $ denote the number of shortest paths from $ (4,1) $ to $ (1,n) $ in grid $ S $,  \nwhere $ S \\subseteq \\text{internal cells} $ is the set of cells occupied by hotels.  \n\n**Constraints**  \n1. $ n $ is odd, $ 3 \\leq n \\leq 99 $  \n2. $ 0 \\leq k \\leq 2(n - 2) $  \n3. Hotels are placed only in internal cells: $ S \\subseteq \\{2,3\\} \\times \\{2, \\dots, n-1\\} $, $ |S| = k $  \n\n**Objective**  \nDetermine whether there exists a set $ S $ of $ k $ internal cells such that:  \n$$\nP_A(S) = P_B(S)\n$$  \nIf yes, output \"YES\" and a $ 4 \\times n $ grid representation with `#` for hotels and `.` otherwise.  \nIf no, output \"NO\".","simple_statement":null,"has_page_source":false}