Grammy has an n×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 2nm 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 T (1≤T≤2000), denoting the number of test cases.
For each test case:
The only line contains two integers n and m (1≤n,m≤1000). It is guaranteed that the sum of n⋅m does not exceed 106.
For each test case, if no solution exists, output "NO". Otherwise, output "YES" followed by n lines. Each line should contain m characters. 0 denotes a white square and 1 denotes a black square in the solution.