Fox Ciel wants to write a task for a programming contest. The task is: "You are given a simple undirected graph with *n* vertexes. Each its edge has unit length. You should calculate the number of shortest paths between vertex 1 and vertex 2."

Same with some writers, she wants to make an example with some certain output: for example, her birthday or the number of her boyfriend. Can you help her to make a test case with answer equal exactly to *k*?
The first line contains a single integer *k* (1 ≤ *k* ≤ 10<sup class="upper-index">9</sup>).
k = int(input())
res = []
while k:
    n = len(bin(k)) - 2
    rem = k - (1 << n - 1)
    res.append(n - 1)
    k = rem
tot = sum(res) * 2 + 2
grid = [['N'] * tot for _ in range(tot)]
cur = 2
for i in res:
    for j in range(i):
        if j == 0:
            grid[0][cur] = grid[cur][0] = 'Y'
            grid[0][cur + 1] = grid[cur + 1][0] = 'Y'
        else:
            grid[cur - 2][cur] = grid[cur][cur - 2] = 'Y'
            grid[cur - 2][cur + 1] = grid[cur + 1][cur - 2] = 'Y'
            grid[cur - 1][cur] = grid[cur][cur - 1] = 'Y'
            grid[cur - 1][cur + 1] = grid[cur + 1][cur - 1] = 'Y'
        if j == i - 1:
            grid[cur][1] = grid[1][cur] = 'Y'
            grid[cur + 1][1] = grid[1][cur + 1] = 'Y'
        cur += 2
for i in grid:
    print(*i, sep='')
