Painting Grid

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Grammy has an n×mn \times m wall covered by squares. Each small square on the wall is of unit size and should be painted into one color completely. She wants to color the wall into black and white. Grammy likes the concept of diversity, so she decided to make each row look different from all previous rows and also make each column look different from all previous columns. As she was about to paint, she found her paint was just enough: half of white paint and half of black paint, both with an amount to paint exactly nm2\frac{nm}{2} unit area. Please help Grammy to satisfy her diversity condition using limited paint.

입력

The input contains multiple test cases.

The first line contains a single integer TT (1T20001 \leq T \leq 2000), denoting the number of test cases.

For each test case:

The only line contains two integers nn and mm (1n,m10001 \leq n,m \leq 1000). It is guaranteed that the sum of nmn \cdot m does not exceed 10610^6.

출력

For each test case, if no solution exists, output "NO". Otherwise, output "YES" followed by nn lines. Each line should contain mm characters. 00 denotes a white square and 11 denotes a black square in the solution.