Killer Sajin's Matrix
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Sajin gives you 3 integers n,m,k, and gives you a task:

Find any 01-matrix a with n rows and m columns where sum of each row and each column is odd. Among all of elements, there are exactly k elements have value 1 and elements have value 0.

输入描述:

Each test contains multiple test cases. The first line contains the number of test cases T (). Description of the test cases follows.

Each test case has 3 integers n,m,k () - the height and width of the 01-matrix, the number of elements with value 1, respectively.

It is guaranteed that the sum of k over all test cases does not exceed .

输出描述:

If the matrix is not existed, print a single line containing "No".

Otherwise print a line containing "Yes" and the next each k line print 2 integers i,j, which means .

If there are multiple answers, print any.

You can print letters in any case (upper or lower).
示例1

输入

复制
4
2 2 1
2 2 2
3 3 3
4 4 10

输出

复制
No
Yes
1 2
2 1
Yes
1 3
2 2
3 1
Yes
1 3
1 2
1 1
2 3
2 2
2 1
3 4
3 3
3 2
4 1