Problem: You are given two positive integers n (1 ≤ n ≤ 10^9) and k (1 ≤ k ≤ 100). Represent the number n as the sum of k positive integers of the same parity (have the same remainder when divided by 2).

In other words, find a_1, a_2, …, a_k such that all a_i>0, n = a_1 + a_2 + … + a_k and either all a_i are even or all a_i are odd at the same time.

If such a representation does not exist, then report it.

Input

The first line contains an integer t (1 ≤ t ≤ 1000) — the number of test cases in the input. Next, t test cases are given, one per line.

Each test case is two positive integers n (1 ≤ n ≤ 10^9) and k (1 ≤ k ≤ 100).

Output

For each test case print:

  * YES and the required values a_i, if the answer exists (if there are several answers, print any of them); 
  * NO if the answer does not exist. 



The letters in the words YES and NO can be printed in any case.

Example

Input


8
10 3
100 4
8 7
97 2
8 8
3 10
5 3
1000000000 9


Output


YES
4 2 4
YES
55 5 5 35
NO
NO
YES
1 1 1 1 1 1 1 1
NO
YES
3 1 1
YES
111111110 111111110 111111110 111111110 111111110 111111110 111111110 111111110 111111120

Solution (in PYTHON3):

Solution:

def main():
    #from collections import defaultdict
    #from collections import Counter
    #import math
    # from fractions import Fraction
    # import heapq
    #from bisect import bisect_left
    import sys
    input = sys.stdin.buffer.readline
    #mod=998244353
    def GCD(x, y):
        while (y):
            x, y = y, x % y
        return x
    def lcm(a,b):
        return (a*b)//GCD(a,b)
    # Modified merge for inversion
    def merge(a,start,mid,end,d):
        p=start
        q=mid+1
        arr=[0]*(end-start+1)
        k=0
        coun=0
        for i in range(start,end+1):
            if p > mid:
                arr[k]=a[q]
                q+=1
                k+=1
            elif q > end:
                arr[k]=a[p]
                d[a[p]] += coun
                k+=1
                p+=1
            elif a[p] < a[q]:
                arr[k]=a[p]
                d[a[p]]+=coun
                k+=1
                p+=1
            else:
                arr[k]=a[q]
                k+=1
                q+=1
                coun+=1

        for i in range(k):
            a[start]=arr[i]
            start+=1
    def mergesort(a, start, end,d):
        if start<end:
            mid=(start+end)//2
            mergesort(a,start,mid,d)
            mergesort(a,mid+1,end,d)
            merge(a,start,mid,end,d)
    # inversion return dic for every index inversion count
    def inversion(l):
        d={}
        for i in l:
            d[i]=0
        mergesort(l,0,len(l)-1,d)
        return d
    def binary_search_lower(A,low,high,k):
        if high-low!=1:
            mid=(low+high)//2
            x = A[mid]
            if x>=k:
                return binary_search_lower(A,low,mid,k)
            else:
                return binary_search_lower(A,mid,high,k)
        if A[low]>=k:
            return low
        else:
            return high
    # Function to find power
    def binary_expo(x,n):
        if n==0:
            return 1
        elif n%2==0:
            return binary_expo(x*x,n//2)
        else:
            return x*binary_expo(x*x,(n-1)//2)
    # Function to find power with given modulus
    def modu_expo(x,n,m):
        if n==0:
            return 1
        elif n%2==0:
            return modu_expo((x*x)%m,n//2,m)
        else:
            return (x*modu_expo((x*x)%m,(n-1)//2,m))%m
    # Function for modular multiplicative inverse via using extended_GCD_Euclid's
    def eEuclid(c, m):
        if m == 0:
            global d
            global x
            global y
            d = c
            x = 1
            y = 0
        else:
            eEuclid(m, c % m)
            temp = x
            x = y
            y = temp - (c // m) * y
    def mod_Inv(c, m):
        eEuclid(c, m)
        return (x % m + m) % m
    # Function for nCr%p using fermat (p is prime)
    def ncr(n, r, p):
        num = den = 1
        for i in range(r):
            num = (num * (n - i)) % p
            den = (den * (i + 1)) % p
        return (num * pow(den,
                          p - 2, p)) % p
    #*************************************************************
    for _ in range(int(input())):
        n,k=map(int,input().split())
        if n%k==0:
            ans=[n//k]*k
        else:
            ans=[n//k]*k
            ans[0]+=n%k
        even=[]
        e=0
        for i in ans:
            if i%2!=0 and i!=0:
                i=i-1
                e+=1
            even.append(i)
        if e%2==0:
            even[0]+=e
            if 0 not in even:
                print("YES")
                for i in even:
                    print(i,end=" ")
                print()
                continue
        odd=[]
        o=0
        for i in ans:
            if i % 2 == 0 and i!=0:
                i = i - 1
                o += 1
            odd.append(i)
        if o%2==0:
            odd[0]+=o
            if 0 not in odd:
                print("YES")
                for i in odd:
                    print(i, end=" ")
                print()
                continue
        print("NO")


if __name__ == "__main__":
    main()