For two sequences and , we define as the length of their longest common subsequence.
You are given 4 integers . Determine if there exist 3 permutations of integers from 1 to , such that:
If such permutations exist, find any such triple of permutations.
A permutation of integers from 1 to is a sequence of length such that all elements are distinct integers in the range . For example, is a permutation of integers from 1 to 5 while and are not.
A sequence is a subsequence of a sequence if can be obtained from by deletion of several (possibly, zero or all) elements. For example, is a subsequence of while is not.
The longest common subsequence of the sequences and is the longest sequence which is a subsequence of both and . For example, the longest common subsequence of the sequences and is since it is a subsequence of both sequences and is the longest among such subsequences. is the length of the longest common subsequence, which is 2 in the example above.
输入格式
The first line of the input contains a single integer () - the number of test cases. The description of the test cases follows.
The only line of each test case contains 5 integers (, ).
If , just determine if such permutations exist. If , you also have to find such a triple of permutations if it exists.
It's guaranteed that the sum of over all test cases doesn't exceed .
输出格式
For each test case, in the first line, output "YES", if such permutations exist, and "NO" otherwise. If , and such permutations exist, output three more lines:
In the first line output integers - the elements of the permutation .
In the second line output integers - the elements of the permutation .
In the third line output integers - the elements of the permutation .
If there are multiple triples, output any of them.
You can output each letter in any case (for example, "YES", "Yes", "yes", "yEs", "yEs" will be recognized as a positive answer).