Limits
1s, 512 MB

You are given two integers $n$ and $k$. We define an operation on a $r\times c$ binary matrix as follows:

- Choose any $i$ ($1 \le i \le r$) and invert the bit of all the cells in $i^t$$^h$ row.

Construct an $n\times n$ matrix such that:

It has $k$ cells containing $1$s and the rest $n^2-k$ cells contain $0$s.

All the $1$s remain connected if $\bf{not}$ $\bf{more}$ $\bf{than}$ $\bf{one}$ operation is performed. We call two cells $A$ and $B$ connected if the cell $B$ can be reached from $A$ by only traversing through the neighboring cells that are $1$. Here, two cells are considered to be neighbors if and only if they share a side.

Or report if it is impossible.

The first and only line of the input contains two integers $n$ $(1\le n\le 100)$ and $k$ $\bf (\binom{n}{2}\le k \le n^2)$.

In the first line, print "NO" if the construction is impossible to achieve.

Otherwise, print "YES" in the first line, and in the next $n$ lines, print an $n\times n$ binary matrix that satisfies the constraints. If there are multiple such valid matrices, print any of them.

Input | Output |
---|---|

1 0 | YES 0 |

Input | Output |
---|---|

2 4 | YES 11 11 |

Input | Output |
---|---|

6 24 | YES 111111 011001 001111 111011 111111 000000 |

Note that, sharing a corner does not make two cells neighbors.