K. Keeping Cows
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

A cow. CC BY-SA 3.0 by Kim Hansen on Wikimedia Commons

Farmer Kiki has $$$42$$$ cows. Their field can be thought of as a grid where each cell is a square with a side length of one metre. According to strict regulations of the German Cow Perimeter Conglomerate, the cows must graze on a fenced area that is exactly $$$a$$$ square metres large.

Unfortunately, Farmer Kiki's supplier messed up their order of fence pieces. Instead of mostly straight fence pieces and just a few corner fence pieces, they only received an enormous amount of corner fence pieces. There are even more pieces than would fit on the field. One corner fence looks like this:

....
.O#.
.#..
....

Here 'O' denotes the center of the fence, '#' denotes the sides of the fence, and '.' denotes empty space.

Farmer Kiki can rotate and move each corner fence grid-aligned. How may they place them such that there is a side-connected component of exactly $$$a$$$ empty cells that is surrounded by fence pieces? More exactly, for each interior cell of that component all four orthogonal neighbours have to either also be an interior empty cell or part of a fence piece.

Farmer Kiki's field is $$$100 \times 100$$$ cells large and they cannot place any fence piece outside this area.

Two valid and one invalid construction for the first sample with fenced area $$$4$$$. The left construction represents the given sample answer. On the right, the four interior cells are not side-connected.

Input

The input consists of:

  • One line with an integer $$$a$$$ ($$$1\leq a \leq 5000$$$), the exact number of cells the cow enclosure should contain.
Output

Output two integers $$$h$$$ and $$$w$$$ ($$$1 \leq h, w \leq 100$$$), the height and width of the used area. Then output the fence placement represented by $$$h$$$ strings of length $$$w$$$ containing only '#', '.', and 'O' (the letter, not the digit '0').

If there are multiple valid solutions, you may output any one of them.

Examples
Input
4
Output
4 4
O##O
#..#
#..#
O##O
Input
9
Output
7 9
O##OO##.#
#..###O#O
#......#.
O##O.##O.
#..##O...
O##O.....
...#.....