for _ inrange(t): n, k, x = map(int, input().split())
if x == 1: if k == 1: print('NO') continue elif k == 2: if n % 2 == 0: print('YES') print(n//2) for _ inrange(n//2): print(2, end=' ') print() else: print('NO') continue else: print('YES') print(n//2) while n > 3: print(2, end=' ') n -= 2 print(n) else: print('YES') print(n) for _ inrange(n): print(1, end=' ') print()
for _ inrange(t): A = list(map(int, input().split())) B = list(map(int, input().split())) C = list(map(int, input().split())) B[0] = B[0] - A[0] B[1] = B[1] - A[1] C[0] = C[0] - A[0] C[1] = C[1] - A[1]
# if B and C are in the same quadrant if (B[0] * C[0] > 0and B[1] * C[1] > 0) \ or (B[0] * C[0] == 0and B[1] * C[1] > 0) \ or (B[0] * C[0] > 0and B[1] * C[1] == 0): print(min(abs(B[0]), abs(C[0])) + 1 + min(abs(B[1]), abs(C[1])) + 1 - 1) elif B[0] * C[0] <= 0and B[1] * C[1] > 0: # the same side but different quadrant print(min(abs(B[1]), abs(C[1])) + 1) elif B[0] * C[0] > 0and B[1] * C[1] <= 0: # the same side but different quadrant print(min(abs(B[0]), abs(C[0])) + 1) else: # opposite quadrant print(1)