A positive integer x is called a power of two if it can be represented as x = 2^y, where y is a non-negative integer. So, the powers of two are 1, 2, 4, 8, 16, ....

You are given two positive integers n and k. Your task is to represent n as the sum of exactly k powers of two.

Input

The only line of the input contains two integers n and k (1 ≤ n ≤ 10^9, 1 ≤ k ≤ 2 ⋅ 10^5).

Output

If it is impossible to represent n as the sum of k powers of two, print NO.

Otherwise, print YES, and then print k positive integers b_1, b_2, ..., b_k such that each of b_i is a power of two, and ∑ _{i = 1}^{k} b_i = n. If there are multiple answers, you may print any of them.

Examples

Input


9 4


Output


YES
1 2 2 4 


Input


8 1


Output


YES
8 


Input


5 1


Output


NO


Input


3 7


Output


NO

Difficulty: MEDIUM
Tags: Bit manipulation

Greedy algorithms
Skill types: Bit manipulation

Greedy algorithms

Starter code:

Solutions:
import math
(n, k) = [int(x) for x in input().split()]
s = k
arr = [1 for i in range(k)]
i = k - 1
while i >= 0:
	while s + arr[i] <= n:
		s += arr[i]
		arr[i] *= 2
	i -= 1
if s != n:
	print('NO')
else:
	print('YES')
	for i in range(0, k, 1):
		print(arr[i], end=' ')


(n, k) = map(int, input().split())
if bin(n).count('1') > k or n < k:
	print('NO')
else:
	a = []
	s = bin(n)[2:]
	s = s[::-1]
	for i in range(len(s)):
		if s[i] == '1':
			a.append(2 ** i)
	a.sort()
	while len(a) < k and a[-1] != 1:
		x = a.pop()
		b = [x // 2, x // 2]
		while len(a) > 0 and a[-1] == x and (len(a) + len(b) < k) and (a[-1] != 1):
			a.pop()
			b += [x // 2, x // 2]
		a += b
	if len(a) == k:
		print('YES')
		print(*a)
	else:
		print('NO')


import sys
(n, k) = map(int, input().split())
m = bin(n)[2:]
m = [int(i) for i in m]

def val(a):
	l = len(a)
	x = 0
	p = 1
	for i in range(l):
		x += a[i] * p
		p *= 2
	return x
while True:
	if sum(m) == k:
		print('YES')
		m = m[::-1]
		x = 1
		for i in m:
			for j in range(i):
				print(x, end=' ')
			x *= 2
		print()
		sys.exit(0)
	else:
		l = len(m)
		f = 0
		x = sum(m)
		for i in range(l - 1):
			while m[i] > 0:
				m[i] -= 1
				m[i + 1] += 2
				f = 1
				x += 1
				if x == k:
					break
			if x == k:
				break
		if f == 0:
			print('NO')
			sys.exit(0)


def altro(n, d):
	for i in range(len(d)):
		if n < d[i]:
			return d[i - 1]

def mini(n, d):
	if n == 1:
		return 1
	if n > d[-1]:
		return d[-1]
	if n in d:
		return n
	return altro(n, d)

def f(n, k, d):
	m = n
	flag = True
	lista = []
	while flag:
		if k == 1:
			flag = False
			if m in d:
				lista.append(str(m))
				res = ['YES', lista]
			else:
				res = ['NO', []]
		elif k > m:
			flag = False
			res = ['NO', []]
		elif k == m:
			flag = False
			res = ['YES', lista + [str(1)] * k]
		else:
			diff = m - k + 1
			el = mini(diff, d)
			lista.append(str(el))
			m -= el
			k -= 1
	return res
lista = list(map(int, input().rstrip().split()))
n = lista[0]
k = lista[1]
d = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912]
[ans, lista] = f(n, k, d)
print(ans)
if ans == 'NO':
	pass
else:
	print(' '.join(lista))


(n, m) = map(int, input().split())
a = [1] * m
n -= m
i = 0
while n > 0 and i < m:
	while a[i] <= n:
		n -= a[i]
		a[i] *= 2
	i += 1
if n == 0:
	print('YES')
	print(*a)
else:
	print('NO')


import random
K = []
k = 0

def isPowerOfTwo(num):
	return num & num - 1 == 0

def findTwo_sPowers(num):
	_k = list(bin(num).replace('0b', ''))
	K1 = []
	for i in range(0, len(_k)):
		if _k[i] == '1':
			K1.append(pow(2, len(_k) - i - 1))
	return K1

def distributeTwo_sPowers():
	if len(K) > k:
		return False
	elif len(K) == k:
		return list('1' * k)
	else:
		max_n = max(K)
		if max_n == 1:
			return False
		m_k = max(findTwo_sPowers(k - len(K) + 1))
		if max_n >= m_k:
			K[K.index(max_n)] = int(max_n / m_k)
			for i in range(1, m_k):
				K.append(int(max_n / m_k))
		else:
			K[K.index(max_n)] = int(max_n / max_n)
			for i in range(1, max_n):
				K.append(int(max_n / max_n))
		return distributeTwo_sPowers()
(n, k) = map(int, input().split())
if k > n:
	print('NO')
else:
	K = findTwo_sPowers(n)
	if distributeTwo_sPowers():
		print('YES')
		print(' '.join((str(i) for i in K)))
	else:
		print('NO')


from math import floor, log
(n, k) = map(int, input().split())
pn = n
l = []
while n > 0:
	y = floor(log(n, 2))
	x = 2 ** y
	n -= x
	l.append(x)
if len(l) > k or k > pn:
	print('NO')
else:
	print('YES')
	z = k - len(l)
	j = 0
	while len(l) < k:
		if l[j] == 1:
			j += 1
		else:
			l[j] //= 2
			l.append(l[j])
		if l[j] == 1:
			j += 1
	for item in l:
		print(item, end=' ')


(n, k) = map(int, input().split())
n1 = n
mas = []
while n != 0:
	mas.append(n % 2)
	n = n // 2
if sum(mas) > k or k > n1:
	print('NO')
else:
	flag = True
	s = sum(mas)
	i = len(mas) - 1
	while flag:
		if s - mas[i] + 2 * mas[i] < k:
			mas[i - 1] += mas[i] * 2
			s += mas[i]
			mas[i] = 0
			i -= 1
		else:
			b = k - s
			mas[i] -= b
			mas[i - 1] += 2 * b
			flag = False
	s = ''
	print('YES')
	for i in range(0, i + 1):
		for j in range(mas[i]):
			print(2 ** i, end=' ')


from collections import OrderedDict
(n, k) = map(int, input().split())
a = dict()
e = 1
while e <= 1000000000:
	a[e] = 0
	e *= 2
a = OrderedDict(sorted(a.items()))
l = list(a.keys())
l.reverse()
while n:
	for i in l:
		if i <= n:
			a[i] += 1
			n -= i
			break
x = sum(a.values())
if x > k:
	print('NO')
	exit()
k -= x
while k:
	cnd = sum((a[v] for v in a if v > 1))
	if cnd == 0:
		break
	else:
		for i in a:
			if i > 1 and a[i] > 0:
				a[i] -= 1
				a[i / 2] += 2
				k -= 1
				break
if k > 0:
	print('NO')
else:
	print('YES')
	for i in a:
		for j in range(a[i]):
			print(i, end=' ')


import sys
line = sys.stdin.readline().strip().split()
n = int(line[0])
k = int(line[1])
powers = []
p = 0
if n < k:
	print('NO')
else:
	if k > 32:
		powers = [1] * (k - 32)
		n = n - k + 32
		k = 32
	while n > 0:
		while n - 1 < 2 ** (k - 1) and n != 0 and (k != 0):
			powers.append(2 ** p)
			n = n - 1
			k = k - 1
		if n > 0:
			if n % 2 == 1:
				powers.append(2 ** p)
				n = n - 1
				k = k - 1
			else:
				n = n // 2
				p = p + 1
	if k == 0:
		print('YES')
		print(' '.join(list(map(str, powers))))
	else:
		print('NO')


(n, m) = map(int, input().split())
k = n
d = {0: n}
i = 1
while k > m:
	c = int(d[i - 1] / 2)
	d[i - 1] -= c * 2
	if c == 0:
		print('NO')
		exit()
	d[i] = c
	i += 1
	k -= c
p = abs(k - m)
i -= 1
while p > 0:
	if i == 0:
		print('NO')
		exit()
	v1 = min(p, d[i])
	p -= v1
	d[i] -= v1
	d[i - 1] += v1 * 2
s = ''
for x in d:
	s += (str(2 ** x) + ' ') * d[x]
print('YES')
print(s)


pt = []
for i in range(31):
	pt.append(2 ** i)
pt = pt[::-1]
(n, k) = map(int, input().split())

def divide(a, g):
	i = 0
	while len(a) != g:
		if a[i] == 1:
			i += 1
		else:
			e = a.pop(i)
			a.append(e // 2)
			a.append(e // 2)
	return a
if k > n:
	print('NO')
else:
	ps = []
	for i in pt:
		if i <= n:
			n = n - i
			ps.append(i)
	if len(ps) > k:
		print('NO')
	elif len(ps) < k:
		print('YES')
		print(' '.join(map(str, divide(ps, k))))
	else:
		print('YES')
		print(' '.join(map(str, ps)))


l = list()
(n, k) = tuple(map(int, input().split()))
num = n
ones = 0
while num > 0:
	if num % 2 == 1:
		l.append(1)
		ones += 1
	else:
		l.append(0)
	num //= 2
if k > n or k < ones:
	print('NO')
else:
	print('YES')
	m = len(l) - 1
	while ones < k:
		if k - ones > l[m]:
			l[m - 1] += 2 * l[m]
			ones += l[m]
			l[m] = 0
		else:
			l[m - 1] += 2 * (k - ones)
			l[m] -= k - ones
			ones = k
		m -= 1
	num = 1
	i = 0
	while i < len(l):
		for j in range(l[i]):
			print(num, end=' ')
		num *= 2
		i += 1


(n, k) = map(int, input().split())
bn = bin(n)[2:][::-1]
mx = 0
mst = [0] * len(bn)
for i in range(len(bn)):
	if bn[i] == '1':
		mst[i] = 1
		mx += 1
mst = mst[::-1]
lmst = len(mst)
if mx <= k and n >= k:
	i = 0
	while sum(mst) != k:
		if sum(mst) - mst[i] + mst[i] * 2 <= k:
			mst[i + 1] += mst[i] * 2
			mst[i] = 0
		else:
			ost = sum(mst[:i] + mst[i + 1:])
			x = k - ost - mst[i]
			mst[i + 1] += 2 * x
			mst[i] -= x
		i += 1
	mst = mst[::-1]
	print('YES')
	for i in range(lmst):
		print((str(2 ** i) + ' ') * mst[i], end='')
else:
	print('NO')


N = [int(i) for i in input().split()]
kol = N[1]
number = N[0]
k = 1
arr = []
flag = 1
if kol > number:
	flag = 0
elif kol == number:
	flag = 2
else:
	while number != 0:
		while k <= number:
			k *= 2
		k /= 2
		number -= k
		arr.append(int(k))
		k = 1
	our_kol = len(arr)
	if our_kol > kol:
		flag = 0
	else:
		while our_kol != kol:
			if kol - our_kol >= arr[0]:
				our_kol += arr[0] - 1
				arr += [1] * arr[0]
				arr.pop(0)
			else:
				d = arr[0] // 2
				arr.pop(0)
				arr.insert(0, d)
				arr.insert(0, d)
				our_kol += 1
if flag == 0:
	print('NO')
elif flag == 2:
	print('YES')
	for i in range(kol):
		print(1, end=' ')
elif flag == 1:
	print('YES')
	for i in arr:
		print(i, end=' ')


import sys
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
(n, k) = int_array()
binary = bin(n).replace('0b', '')
if binary.count('1') > k or k > n:
	print('NO')
else:
	this = sorted([2 ** (len(binary) - i - 1) for i in range(len(binary)) if binary[i] == '1'])
	ones = 0
	while len(this) + ones != k:
		if this[-1] == 1:
			this.pop()
			ones += 1
		else:
			x = this[-1]
			if k - (len(this) - 1) - ones >= x:
				this.pop()
				ones += x
			else:
				this.pop()
				this.append(x // 2)
				this.append(x // 2)
	this += [1] * ones
	print('YES')
	print(*this)


(n, k) = map(int, input().split())
arr = [1] * k
n -= k
i = 0
while i < k and n:
	while arr[i] <= n:
		n -= arr[i]
		arr[i] *= 2
	i += 1
if n:
	print('NO')
else:
	print('YES', *arr)


def solve(n, k):
	arr = [1 for i in range(k)]
	sm = k
	i = k - 1
	while i >= 0:
		while sm + arr[i] <= n:
			sm += arr[i]
			arr[i] *= 2
		i -= 1
	return arr
(n, k) = map(int, input().split())
res = solve(n, k)
if sum(res) == n:
	print('YES')
	print(*res)
else:
	print('NO')


entrada = input().split(' ')
n = int(entrada[0])
k = int(entrada[1])
lista = [1] * k
total = k
for i in range(k - 1, -1, -1):
	while total + lista[i] <= n:
		total = total + lista[i]
		lista[i] = lista[i] * 2
if total != n:
	print('NO')
else:
	print('YES')
	print(*lista, sep=' ')


import math
(n, k) = map(int, input().split())

def getMin(n):
	count = 0
	while n:
		count += 1
		d = int(math.log(n, 2))
		n -= math.pow(2, d)
	return count

def getSeq(n, k):
	if n == k:
		return [1] * k
	seq = []
	if k == 0:
		return seq
	d = int(math.log(n, 2))
	for i in range(d, -1, -1):
		x = int(math.pow(2, i))
		(a, b) = (1, n - x)
		if a + b < k:
			continue
		else:
			seq += [x]
			seq += getSeq(n - x, k - 1)
			return seq
	return seq

def sol(n, k):
	MAX = n
	MIN = getMin(n)
	if k > MAX or k < MIN:
		return 'NO'
	else:
		seq = getSeq(n, k)
		seq_new = [str(x) for x in seq]
		return 'YES\n%s' % ' '.join(seq_new)
print(sol(n, k))


def GETBIT(x, bit):
	return x >> bit & 1

def solve(n, k):
	if n < k:
		print('NO')
		return
	sbit = 0
	lst = [0] * k
	for i in range(30):
		if GETBIT(n, i) == 1:
			sbit += 1
			if sbit <= k:
				lst[sbit - 1] = i
	if sbit > k:
		print('NO')
		return
	cnt = sbit
	pos = sbit - 1
	while cnt < k and pos >= 0:
		if lst[pos] == 0:
			pos -= 1
			continue
		lst[pos] = lst[pos] - 1
		lst[pos + 1] = lst[pos]
		pos += 1
		cnt += 1
	if cnt < k:
		print('NO')
		return
	print('YES')
	print(*(1 << lst[i] for i in range(k)))
(n, k) = map(int, input().split())
solve(n, k)


import math
[n, k] = [int(x) for x in input().split(' ')]

def solve():
	A = [1] * k
	currentSum = k
	if sum(A) > n:
		print('NO')
		return
	else:
		for i in range(k):
			A[i] = int(math.pow(2, math.floor(math.log2(n - currentSum + 1))))
			currentSum += A[i] - 1
			if currentSum == n:
				print('YES')
				print(' '.join([str(a) for a in A]))
				return
	print('NO')
	return
solve()


import math
(n, k) = list(map(int, input().split()))
binnum = bin(n)[2:]
bits = [int(item) for item in binnum]
if sum(bits) > k or k > n:
	print('NO')
else:
	(v, m) = (sum(bits), len(bits))
	ok = False
	for i in range(m):
		if k == v:
			ok = True
			break
		count = bits[i]
		if i < m - 1:
			if count >= k - v:
				bits[i + 1] += 2 * (k - v)
				bits[i] -= k - v
				ok = True
				break
			else:
				bits[i + 1] += 2 * bits[i]
				v += bits[i]
				bits[i] = 0
	if ok:
		print('YES')
		res = []
		for i in range(m):
			for j in range(bits[i]):
				res.append(int(math.pow(2, m - i - 1)))
		print(' '.join(map(str, res)))
	else:
		print('NO')


(N, k) = list(map(int, input().split()))
n = N
mas = [1] * 32
ans = [0] * 32
for i in range(1, 32):
	mas[i] = mas[i - 1] * 2
I = 31
while n > 0:
	if n >= mas[I]:
		ans[I] += 1
		n -= mas[I]
	I -= 1
if sum(ans) > k or k > N:
	print('NO')
else:
	print('YES')
	k -= sum(ans)
	while k > 0:
		for i in range(31, 0, -1):
			if ans[i] > 0:
				ans[i] -= 1
				ans[i - 1] += 2
				k -= 1
				break
	for i in range(31, -1, -1):
		for j in range(ans[i]):
			print(mas[i], end=' ')


from collections import Counter
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
import math

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def divs(n, start=2):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors
import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_i():
	return map(int, sys.stdin.readline().split())
from bisect import bisect_left
import sys

def fxn(st, en, ind, step):
	mid = st + (en - st) // 2
	if ind < mid:
		return fxn(st, mid - 1, ind, step - 1)
	elif ind > mid:
		return fxn(mid + 1, en, ind, step - 1)
	else:
		return step
import sys
(n, k) = get_i()
r = bin(n)[2:]
if k > n or k < r.count('1'):
	print('NO')
else:
	ans = [1] * k
	s = k
	for i in range(k):
		while s + ans[i] <= n:
			s += ans[i]
			ans[i] <<= 1
	if sum(ans) == n:
		print('YES')
		print(*sorted(ans))
	else:
		print('NO')


(n, k) = tuple(map(int, input().split()))
pow2 = []
m = n
p = 1
while m > 0:
	if m % 2 == 1:
		pow2.append(p)
	m >>= 1
	p *= 2
if n < k or len(pow2) > k:
	print('NO')
else:
	print('YES')
	i = 0 if pow2[0] > 1 else 1
	while len(pow2) < k:
		pow2[i] //= 2
		pow2.insert(i, pow2[i])
		if pow2[i] == 1:
			i += 2
	print(' '.join([str(a) for a in pow2]))


(n, k) = [int(x) for x in input().split()]
bi = bin(n)[2:]
max_bits = 100
arr = [0] * max_bits
for (idx, bit) in enumerate(bi):
	arr[len(bi) - idx - 1] = int(bit)
K = sum(arr)

def spread_one():
	global K
	for idx in range(1, max_bits):
		if arr[idx] > 0:
			arr[idx - 1] += 2
			arr[idx] -= 1
			K += 1
			break
if sum((1 for x in bi if x == '1')) <= k and n >= k:
	print('YES')
	while K < k:
		spread_one()
	pow_2s = [2 ** idx for (i, m) in enumerate(arr) for idx in [i] * m]
	print(' '.join([str(x) for x in pow_2s]))
else:
	print('NO')


(n, k) = map(int, input().split())

def move_byte(s, times):
	k = s[0]
	if s[0] < times:
		s = move_byte(s, k)
		return move_byte(s, times - k)
	if s[0] == times:
		s[1] += s[0] * 2
		s = s[1:]
		return s
	elif times == 0:
		return s
	else:
		s[1] += times * 2
		s[0] -= times
		return s

def s2print(s):
	top_byte = len(s)
	tv = 2 ** (top_byte - 1)
	k = []
	for n in s:
		k.extend([tv] * n)
		tv = tv // 2
	return ' '.join(map(str, k))
binn = '{0:b}'.format(n)
s = list(map(int, binn))
ones = sum(s)
if ones > k or k > n:
	print('NO')
else:
	s = move_byte(s, k - ones)
	print('YES')
	print(s2print(s))


GI = lambda : int(input())
GIS = lambda : map(int, input().split())
LGIS = lambda : list(GIS())

def main():
	(n, k) = GIS()
	l = []
	ones = 0
	while n:
		(n, m) = divmod(n, 2)
		l.append(m)
		ones += m
	if ones > k:
		print('NO')
		return
	i = len(l) - 1
	while ones < k and i > 0:
		if l[i] == 0:
			i -= 1
		else:
			l[i] -= 1
			l[i - 1] += 2
			ones += 1
	if ones < k:
		print('NO')
	else:
		print('YES')
		for (i, c) in enumerate(l):
			if c:
				print('%i ' % 2 ** i * c, end='')
		print()
main()


(n, k) = [int(j) for j in input().split()]
x = bin(n)[2:]
q = x.count('1')
res = []
if k < q or k > n:
	print('NO')
else:
	print('YES')
	x = [int(j) for j in x]
	r = 0
	c = k - q
	while c > 0:
		while x[r] == 0:
			r += 1
		x[r] -= 1
		x[r + 1] += 2
		c -= 1
	x = x[::-1]
	res = ''
	for i in range(len(x)):
		for j in range(x[i]):
			res += str(2 ** i) + ' '
	print(res[:-1])


from math import ceil
(n, k) = map(int, input().split())
v = n
if v < k:
	print('NO')
else:
	r = []
	s = 0
	d = 0
	g = False
	while v != 0:
		if d + ceil(v / 2) <= k:
			x = v - k + d
			print('YES')
			g = True
			for i in range(x):
				print(2 ** (s + 1), end=' ')
			for i in range(v - 2 * x):
				print(2 ** s, end=' ')
			v = 0
			k = 0
		else:
			s += 1
			if v % 2 == 0:
				v //= 2
			else:
				r.append(2 ** (s - 1))
				d += 1
				v -= 1
				v //= 2
	if not g:
		print('NO')
	else:
		print(*r)


(n, k) = map(int, input().split())
if k > n:
	print('NO')
else:
	count = 0
	l = bin(n)
	b = l[2:]
	my = []
	length = len(b)
	for i in range(length):
		num = int(b[i]) * 2 ** (length - 1 - i)
		if num != 0:
			my.append(num)
			count += 1
	if k < count:
		print('NO')
	elif k == count:
		print('YES')
		for i in my:
			print(i, end=' ')
	else:
		p = 0
		while 1:
			if my[p] != 1:
				my[p] = my[p] // 2
				my.append(my[p])
				count += 1
				if count == k:
					break
			elif my[p] == 1:
				p += 1
			else:
				break
		if count == k:
			print('YES')
			for i in my:
				print(i, end=' ')
		else:
			print('NO')


import math
(n, k) = map(int, input().split())
if n < k:
	print('NO')
else:
	jog = n - k
	a = k * [0]
	for i in range(k - 1, -1, -1):
		jog += 2 ** a[i]
		power = int(math.log(jog) / math.log(2))
		a[i] = power
		jog -= 2 ** power
		if jog <= 0:
			break
	if jog == 0:
		print('YES')
		for i in range(k):
			a[i] = 2 ** a[i]
		print(*a)
	else:
		print('NO')


(n, k) = map(int, input().split())
if n < k:
	print('NO')
elif bin(n).count('1') > k:
	print('NO')
else:
	print('YES')
	ans = []
	t1 = 0
	while n:
		b = n & -n
		if b == 1:
			t1 += 1
		else:
			ans.append(b)
		n -= b
	while len(ans) + t1 < k:
		p = ans.pop()
		if p == 2:
			t1 += 2
		else:
			ans.append(p // 2)
			ans.append(p // 2)
	print(*[1] * t1 + sorted(ans))


(n, k) = map(int, input().split(' '))
a = []
while n > 0:
	i = 1
	while i * 2 <= n:
		i *= 2
	n -= i
	a.append(i)
if len(a) > k:
	print('NO')
	exit()
k -= len(a)
i = 0
while k > 0 and i < len(a):
	while a[i] > 1 and k > 0:
		a.append(a[i] // 2)
		a[i] = a[i] // 2
		k -= 1
	i += 1
if k == 0:
	print('YES')
	for i in a[:-1]:
		print(i, end=' ')
	print(a[-1])
else:
	print('NO')


from math import *
(n, k) = map(int, input().split())
b = bin(n)[2:]
x = b.count('1')
if b.count('1') > k:
	print('NO')
elif k > n:
	print('NO')
else:
	ansarr = []
	for i in range(len(b) - 1, -1, -1):
		if b[i] == '1':
			ansarr.append(1)
		else:
			ansarr.append(0)
	diff = k - x
	i = len(b) - 1
	while i > 0:
		if diff > 0:
			if ansarr[i] > 0:
				if ansarr[i] <= diff:
					ansarr[i - 1] += ansarr[i] * 2
					diff -= ansarr[i]
					ansarr[i] = 0
				else:
					ansarr[i - 1] += diff * 2
					ansarr[i] -= diff
					diff = 0
			i -= 1
		else:
			break
	if diff == 0:
		print('YES')
		ans = []
		for i in range(len(ansarr)):
			if ansarr[i] > 0:
				for j in range(ansarr[i]):
					ans.append(2 ** i)
		print(*ans)
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase

def main():
	(n, k) = map(int, input().split())
	s = bin(n)
	ones = s[2:].count('1')
	if k < ones:
		print('NO')
		exit()
	if k > n:
		print('NO')
		exit()
	if k == n:
		print('YES')
		print('1 ' * n)
		exit()
	arr = [0] * 31
	for i in range(31):
		if n & 1 << i:
			arr[i] += 1
	sm = sum(arr)
	r = 30
	while k != sm and r > 0:
		if arr[r] != 0:
			sm += 1
			arr[r] -= 1
			arr[r - 1] += 2
		else:
			r -= 1
	if k == sm:
		print('YES')
	else:
		print('NO')
		exit()
	for i in range(31):
		if arr[i] != 0:
			print(f'{pow(2, i)} ' * arr[i], end='')
	print()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def nouse3():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse4():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse5():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')
main()


from heapq import heappush, heappop

class Backwards(int):

	def __lt__(self, other):
		return not int.__le__(self, other)

	def __le__(self, other):
		return not int.__lt__(self, other)

	def __gt__(self, other):
		return not int.__ge__(self, other)

	def __ge__(self, other):
		return not int.__gt__(self, other)
power = [2 ** i for i in range(31)]
(n, k) = map(int, input().split())
factors = []
while n > 0:
	for i in range(31):
		if power[i] > n:
			heappush(factors, Backwards(power[i - 1]))
			n -= power[i - 1]
			break
if k < len(factors):
	print('NO')
else:
	while len(factors) < k:
		if factors[0] == 1:
			break
		else:
			x = heappop(factors)
			heappush(factors, Backwards(x // 2))
			heappush(factors, Backwards(x // 2))
	if len(factors) == k:
		print('YES')
		factors.sort(reverse=True)
		print(*factors)
	else:
		print('NO')


while True:
	try:

		def soln(n, k):
			res = {}
			queue = []
			for i in range(44):
				if n & 1 << i:
					if i > 0:
						queue.append(1 << i)
					res[1 << i] = 1
			if len(res) > k:
				print('NO')
				return
			cnt = len(res)
			i = 0
			while cnt < k and i < len(queue):
				v = queue[i]
				i += 1
				res[v] -= 1
				if res.get(v // 2) != None:
					res[v // 2] += 2
				else:
					res[v // 2] = 2
				if v // 2 > 1:
					queue.append(v // 2)
					queue.append(v // 2)
				cnt += 1
			if cnt < k:
				print('NO')
				return
			print('YES')
			finl_res = []
			for x in res:
				for j in range(res[x]):
					finl_res.append(x)
			print(*finl_res)

		def read():
			(n, k) = map(int, input().split())
			soln(n, k)
		if __name__ == '__main__':
			read()
	except EOFError:
		break


(n, k) = map(int, input().split())
ans = [1] * k
n -= k
i = 0
while i < k:
	while ans[i] <= n:
		n -= ans[i]
		ans[i] = ans[i] * 2
	i += 1
if n:
	print('NO')
else:
	print('YES')
	print(*ans)


(n, k) = map(int, input().split())
s = [i for i in bin(n)[2:]]
if n < k or s.count('1') > k:
	print('NO')
else:
	print('YES')
	L = []
	for i in range(31):
		L.append(2 ** i)
	a = []
	for i in reversed(range(31)):
		while k > 0 and n - L[i] >= k - 1:
			a.append(L[i])
			k -= 1
			n -= L[i]
	print(*a)


def break_in_pow2(num, arr):
	divisor = 1
	index = 0
	while num >= divisor * 2:
		divisor *= 2
		index += 1
	arr[index] += 1
	if num - divisor > 0:
		break_in_pow2(num - divisor, arr)
line = input().split()
n = int(line[0])
k = int(line[1])
max_k = n
pots = [0] * 31
break_in_pow2(n, pots)
biggest_potency = 0
min_k = 0
for i in range(len(pots)):
	potency = pots[i]
	min_k += potency
	if potency != 0:
		biggest_potency = i
if k < min_k or k > max_k:
	print('NO')
else:
	print('YES')
	for curr_k in range(min_k, k):
		pots[biggest_potency] -= 1
		pots[biggest_potency - 1] += 2
		if pots[biggest_potency] == 0:
			biggest_potency -= 1
	curr_pot = 1
	for pot in pots:
		for i in range(pot):
			print(curr_pot, end=' ')
		curr_pot *= 2
	print()


(b, k) = map(int, input().split())
a = [1] * k
b -= k
i = 0
while i < k and b:
	while a[i] <= b:
		b -= a[i]
		a[i] *= 2
	i += 1
if b:
	print('NO')
else:
	print('YES', *a)


import os, sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def dtb(n):
	return bin(n).replace('0b', '')
(n, k) = map(int, input().split())
t = dtb(n)
t1 = t2 = 0
d = dict()
for (i, v) in enumerate(reversed(t)):
	if v == '1':
		t1 += 1
		t2 += 2 ** i
		d[i] = 1
if t1 <= k <= t2:
	while t1 != k:
		z = max(d)
		if z == 0:
			break
		if d[z] + t1 < k:
			ck = d[z]
			d.__delitem__(z)
			d[z - 1] = d.get(z - 1, 0) + ck * 2
			t1 += ck
		else:
			ck = k - t1
			d[z] -= ck
			d[z - 1] = d.get(z - 1, 0) + ck * 2
			t1 += ck
	if t1 == k:
		print('YES')
		ans = []
		for i in d:
			ans += [2 ** i] * d[i]
		print(*ans)
	else:
		print('NO')
else:
	print('NO')


from collections import deque
(n, k) = [int(x) for x in input().split()]
q = deque()
cnt = {}
for i in range(30):
	if i > n:
		break
	if n & 1 << i:
		if i > 0:
			q.append(1 << i)
		if 1 << i in cnt:
			cnt[1 << i] += 1
		else:
			cnt[1 << i] = 1
cntLen = len(cnt)
if cntLen > k:
	print('NO')
else:
	while cntLen < k and len(q) > 0:
		z = q.__getitem__(0)
		q.popleft()
		cnt[z] -= 1
		if z / 2 in cnt:
			cnt[z / 2] += 2
		else:
			cnt[z / 2] = 2
		if z / 2 > 1:
			q.append(z / 2)
			q.append(z / 2)
		cntLen += 1
	if cntLen < k:
		print('NO')
	else:
		print('YES')
		for (k, v) in cnt.items():
			for i in range(v):
				print(int(k), end=' ')


import math
(n, k) = [int(x) for x in input().split()]
if n < k:
	print('NO')
elif n & n - 1 == 1 and k == 1:
	print('NO')
elif k < list(bin(n)).count('1'):
	print('NO')
else:
	print('YES')
	l = [1] * k
	i = 0
	n -= k
	while n > 0 and i < k:
		while l[i] <= n:
			n -= l[i]
			l[i] *= 2
		i += 1
	print(*l)


(n, k) = map(int, input().split())
a = [2 ** i for i in range(31)]
ans = []
temp = n
for i in reversed(a):
	while k > 0 and temp - i >= k - 1:
		ans.append(i)
		temp -= i
		k -= 1
if sum(ans) != n:
	print('NO')
else:
	print('YES')
	print(*ans)


import sys
(n, k) = map(int, input().split())
l = []
cop = n
t = 0
while cop > 0:
	x = cop % 2 * pow(2, t)
	cop //= 2
	t += 1
	if x != 0:
		l.append(x)
l.sort(reverse=True)
if k > n or k < len(l):
	print('NO')
	sys.exit()
u = len(l) - 1
while len(l) != k:
	if l[u] == 1:
		u -= 1
		if u == -1:
			u += len(l)
	else:
		l[u] = l[u] // 2
		l.append(l[u])
l.sort()
print('YES')
print(*l)


def findYes(arr, m, k, ans):
	ans_string = ''
	print('YES')
	if ans == k:
		for i in range(m):
			if arr[i] == 1:
				seq = pow(2, i)
				ans_string += str(seq) + ' '
	else:
		p = m - 1
		while ans != k:
			while arr[p] >= 1:
				arr[p] -= 1
				arr[p - 1] += 2
				ans += 1
				if ans == k:
					break
			p -= 1
		i = m - 1
		while i >= 0:
			if arr[i] >= 1:
				for j in range(arr[i]):
					seq2 = pow(2, i)
					ans_string += str(seq2) + ' '
			i -= 1
	return ans_string
values = input()
(n, k) = values.split()
n = int(n)
k = int(k)
ans = 0
arr = [0] * 1000
m = 0
temp_n = n
while temp_n:
	arr[m] = temp_n % 2
	temp_n //= 2
	m += 1
i = m - 1
while i >= 0:
	if arr[i] == 1:
		ans += 1
	i -= 1
if k > n or k < ans:
	print('NO')
else:
	ans_string = findYes(arr, m, k, ans)
	print(ans_string)


(n, k) = map(int, input().split())
if k > n:
	print('NO')
else:
	b = bin(n)[2:]
	if b.count('1') == k:
		b = b[::-1]
		print('YES')
		for i in range(len(b)):
			if b[i] == '1':
				print(1 << i, end=' ')
		print('')
	elif b.count('1') < k:
		l = []
		x = -1
		b = b[::-1]
		for i in range(len(b)):
			if b[i] == '1':
				l.append(1 << i)
		k -= len(l)
		for i in l:
			x += 1
			if k <= 0:
				break
			if i != 1:
				i //= 2
				k -= 1
				l += [i] * 2
				l[x] = 0
		if k == 0:
			l.sort()
			print('YES')
			for i in l:
				if i != 0:
					print(i, end=' ')
			print()
		else:
			print('NO')
	else:
		print('NO')


(n, k) = map(int, input().split())
b = bin(n)[2:][::-1]
ar = []
for i in range(len(b)):
	if int(b[i]):
		ar.append(2 ** i)
if n < k or len(ar) > k:
	print('NO')
else:
	for i in range(30):
		ar.sort(reverse=True)
		ct = k - len(ar)
		for i in range(len(ar)):
			mult = 1
			while ar[i] % 2 == 0 and ct >= mult:
				ar[i] //= 2
				ct -= mult
				mult *= 2
			for j in range(mult - 1):
				ar.append(ar[i])
	print('YES')
	print(*ar)


(n, k) = map(int, input().split(' '))
ans = [2 ** i for i in range(31)]
var = n
l = []
for i in reversed(ans):
	while k > 0 and var - i >= k - 1:
		l.append(i)
		var -= i
		k -= 1
	if k == 0:
		break
if sum(l) != n:
	print('NO')
else:
	print('YES')
	for i in l:
		print(i, end=' ')
	print('')


from math import log2, ceil, floor

def check(n):
	while n != 1:
		if n % 2 != 0:
			return False
		n = n // 2
	return True
(n, k) = map(int, input().split())
f = 1
if k > n or (k == 1 and (not check(n))):
	f = 0
a = []
t = 0
p = int(log2(n))
while t < n and k > 0:
	while t + 2 ** p <= n and n - (t + 2 ** p) >= k - 1:
		a.append(2 ** p)
		t += 2 ** p
		k -= 1
	p -= 1
	if p < 0:
		break
if t != n:
	f = 0
if f == 0:
	print('NO')
else:
	print('YES')
	for i in a:
		print(i, end=' ')


(a, s) = map(int, input().split())
d = str(bin(a))[2:]
if a < s or s < d.count('1'):
	print('NO')
else:
	f = [int(d[i]) for i in range(len(d))]
	f.reverse()
	for i in range(len(f) - 1, 0, -1):
		if f[i] != 0:
			if sum(f) + f[i] < s:
				f[i - 1] += 2 * f[i]
				f[i] = 0
			else:
				a = s - sum(f)
				f[i - 1] += a * 2
				f[i] -= a
	print('YES')
	for i in range(len(f)):
		print(f[i] * (str(2 ** i) + ' '), end='')


(n, x) = map(int, input().split())
v = n
l = []
i = 0
for k in range(32):
	if (n & 1 << k) >> k:
		l.append(pow(2, k))
x -= len(l)
if x < 0:
	print('NO')
else:
	i = 0
	while x > 0:
		while i < len(l) and l[i] == 1:
			i += 1
		if i == len(l):
			print('NO')
			exit()
		l[i] //= 2
		l.insert(i, l[i])
		x -= 1
	l = list(map(str, l))
	print('YES')
	print(' '.join(l))


(n, k) = map(int, input().split())
if k > n:
	print('NO')
else:
	a = []
	f = n
	summ = 0
	i = 0
	while n != 0:
		if n % 2 != 0:
			a.append(i)
		n //= 2
		i += 1
	if len(a) > k:
		print('NO')
	else:
		a.sort()
		c = dict()
		for i in a:
			if i in c:
				c[i] += 1
			else:
				c[i] = 1
		summ = len(a)
		while summ != k:
			if c[max(c.keys())] == 0:
				c.pop(max(c.keys()))
			else:
				summ += 1
				x = max(c.keys())
				c[max(c.keys())] -= 1
				if x - 1 in c:
					c[x - 1] += 2
				else:
					c[x - 1] = 2
		a = []
		for i in c.keys():
			for j in range(c[i]):
				a.append(i)
		a.sort()
		print('YES')
		x = 2 ** a[0]
		print(x, end=' ')
		for i in range(1, len(a)):
			for i in range(a[i] - a[i - 1]):
				x *= 2
			print(x, end=' ')


import math
(n, k) = map(int, input().split())
p = bin(n)[2:]
t = p.count('1')
if not n >= k >= t:
	print('NO')
else:
	n += 1
	print('YES')
	while k:
		val = math.floor(math.log(n - k, 2))
		print(2 ** val, end=' ')
		n -= 2 ** val
		k -= 1


input = __import__('sys').stdin.readline
lis = [0] * 32
lis[0] = 1
for i in range(1, 32):
	lis[i] = 2 * lis[i - 1]
(n, k) = map(int, input().split())
ans = [1] * k
if n < k:
	print('NO')
else:
	n -= k
	for i in range(k):
		n += 1
		c = 0
		for j in range(31, -1, -1):
			if lis[j] <= n:
				c = lis[j]
				break
		ans[i] = c
		n -= c
	if n != 0:
		print('NO')
	else:
		print('YES')
		print(*ans)


(n, k) = tuple(map(int, input().split(' ')))
ans = 'YES'
bits = bin(n)[2:]
n_bits = bits.count('1')
if k > n or k < n_bits:
	ans = 'NO'
power = []
[power.append(int(bits[i]) * 2 ** (len(bits) - i - 1)) for i in range(len(bits))]
power.reverse()
reqd = k - n_bits
ans_bits = []
if ans == 'YES':
	while reqd > 0 or len(power) > 0:
		if power[len(power) - 1] == 1 or reqd == 0:
			ans_bits.append(power.pop())
		else:
			val = power.pop()
			if val != 0:
				power.append(val // 2)
				power.append(val // 2)
				reqd -= 1
	print(ans)
	for i in ans_bits:
		if i != 0:
			print(i, end=' ')
else:
	print(ans)


import math
(n, k) = map(int, input().split())
ans = []
mem = []
left = 0
if n == k:
	print('YES')
	for i in range(n):
		print(1, end=' ')
elif k > n:
	print('NO')
else:
	if n % 2 != 0:
		n -= 1
		ans.append(1)
	num = 1
	while 1:
		while num < n:
			num = num << 1
		if num > n:
			num = num >> 1
		if num == n:
			ans.append(num)
			break
		else:
			n = n - num
			ans.append(num)
			num = 1
	length = len(ans)
	if length > k:
		print('NO')
	elif length < k:
		while length != k:
			length -= 1
			need = k - length
			next = ans.pop(-1)
			if next <= need:
				mem.append([1, next])
				length += next
			else:
				ret = int(math.log(need, 2))
				total = 1 << ret
				length += total
				left = k - length
				keep = next >> ret
				mem.append([keep, total - left])
				mem.append([keep // 2, 2 * left])
				break
		print('YES')
		sumA = len(ans)
		for v in ans:
			print(v, end=' ')
		for v in mem:
			for i in range(v[1]):
				print(v[0], end=' ')
	else:
		print('YES')
		print(*ans)


def go():
	(n, k) = [int(i) for i in input().split(' ')]
	o = 'YES\n'
	if n < k:
		return 'NO'
	if k == n:
		o += ' '.join((str(1) for i in range(n)))
		return o
	b = [i for i in bin(n).replace('0b', '')]
	i = len(b) - 2
	ones = 0
	if b[-1] == '1':
		ones += 1
	stack = []
	while i >= 0:
		if b[i] == '1':
			stack.append(2 ** (len(b) - i - 1))
		i -= 1
	if len(stack) + ones == k:
		o += ' '.join((str(i) for i in stack + [1] * ones))
		return o
	if len(stack) + ones > k:
		return 'NO'
	while len(stack) + ones != k and stack:
		x = stack.pop()
		if x == 2:
			ones += 2
		else:
			stack.append(x // 2)
			stack.append(x // 2)
	if len(stack) + ones == k:
		o += ' '.join((str(i) for i in stack + [1] * ones))
		return o
	return 'NO'
print(go())


from heapq import heapify, heappop, heappush
import io
import os
import sys
from atexit import register
import random
import math
import itertools
DEBUG = False
STRESSTEST = False
if not DEBUG:
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
sys.stdout = io.BytesIO()
register(lambda : os.write(1, sys.stdout.getvalue()))
tokens = []
tokens_next = 0

def nextStr():
	global tokens, tokens_next
	while tokens_next >= len(tokens):
		tokens = input().split()
		tokens_next = 0
	tokens_next += 1
	if type(tokens[tokens_next - 1]) == str:
		return tokens[tokens_next - 1]
	return tokens[tokens_next - 1].decode()

def nextInt():
	return int(nextStr())

def nextIntArr(n):
	return [nextInt() for i in range(n)]

def print(*argv, end='\n'):
	for arg in argv:
		sys.stdout.write((str(arg) + ' ').encode())
	sys.stdout.write(end.encode())

def genTestCase():
	raise NotImplementedError

def bruteforce(a):
	raise NotImplementedError

def doStressTest():
	while True:
		curTest = genTestCase()
		mySoln = solve(curTest)
		bruteforceSoln = bruteforce(curTest)
		if mySoln != bruteforceSoln:
			print('### Found case ###')
			print(curTest)
			print(f'{mySoln} should have been: {bruteforceSoln}')
			return

def breakIntoPowersOf2(n):
	rep = bin(n)
	rep = rep[2:]
	rep = list(reversed(rep))
	res = []
	for i in range(len(rep)):
		if rep[i] == '1':
			res.append(1 << i)
	return res

def solve(n, k):
	rep = breakIntoPowersOf2(n)
	rep = [-i for i in rep]
	heapify(rep)
	while len(rep) < k:
		cur = -heappop(rep)
		if cur == 1:
			return None
		heappush(rep, -cur // 2)
		heappush(rep, -cur // 2)
	return [-i for i in rep] if len(rep) == k else None
if not DEBUG and STRESSTEST:
	raise Exception('Wrong flags!')
if STRESSTEST:
	doStressTest()
else:
	n = nextInt()
	k = nextInt()
	res = solve(n, k)
	if res:
		print('YES')
		print(' '.join(map(str, sorted(res))))
	else:
		print('NO')
sys.stdout.flush()


(n, k) = map(int, input().split())
if n < k:
	print('NO')
	exit(0)
c = [0] * 32
for i in range(32):
	if 1 << i & n:
		c[i] += 1
		k -= 1
if k < 0:
	print('NO')
	exit(0)
print('YES')
for _ in range(k):
	for i in range(1, 32):
		if c[i] > 0:
			c[i] -= 1
			c[i - 1] += 2
			break
res = []
for i in range(32):
	for _ in range(c[i]):
		res.append(1 << i)
print(' '.join(map(str, res)))


import math
(n, k) = [int(var) for var in input().split()]
maxOnes = 0
(powers, power) = ([1], int(math.log2(n)))
for i in range(power + 1):
	if n & 1 << i:
		maxOnes += 1
for i in range(power):
	powers.append(powers[-1] * 2)
if not maxOnes <= k <= n:
	print('NO')
else:
	print('YES')
	while k != 0:
		if k == n:
			for _ in range(k):
				print(1, end=' ')
			(k, n) = (0, 0)
		else:
			for Idx in reversed(range(1 + int(math.log2(n)))):
				if k - 1 <= n - powers[Idx]:
					k -= 1
					n -= powers[Idx]
					print(powers[Idx], end=' ')
					break
	print()


def base2(n):
	n = int(n)
	res = ''
	while n > 0:
		res += str(n % 2)
		n = n // 2
	return res[::-1]
(t, k) = input().split()
n = str(base2(t))
if int(t) < int(k) or int(k) < n.count('1'):
	print('NO')
else:
	k = int(k)
	lis = []
	for i in range(len(n)):
		lis.append(int(n[i]))
	lis.reverse()
	while sum(lis) < k:
		for i in range(len(lis) - 1, 0, -1):
			if lis[i] != 0:
				if sum(lis) + lis[i] < k:
					lis[i - 1] += 2 * lis[i]
					lis[i] = 0
				else:
					t = k - sum(lis)
					lis[i - 1] += t * 2
					lis[i] -= t
	print('YES')
	for i in range(len(lis)):
		print(lis[i] * (str(2 ** i) + ' '), end='')


import heapq
data = input().split()
n = int(data[0])
k = int(data[1])
pq = []
for i in range(30):
	if n & 1 << i:
		pq.append(-(1 << i))
heapq.heapify(pq)
if len(pq) > k or k > n:
	print('NO')
	exit(0)
while len(pq) < k:
	u = heapq.heappop(pq)
	heapq.heappush(pq, u // 2)
	heapq.heappush(pq, u // 2)
print('YES')
output = ''
while len(pq) > 0:
	u = -heapq.heappop(pq)
	output += str(u) + ' '
print(output)


import sys
import os.path
import math
from collections import deque
if os.path.exists('input_file.txt'):
	sys.stdin = open('input_file.txt', 'r')
	sys.stdout = open('output_file.txt', 'w')
deq = deque()
(n, k) = map(int, input().split())
f = 1
if n % 2 != 0 & k == 1 or k > n:
	print('NO')
else:
	for i in range(0, len(bin(n)[2:])):
		if 1 << i & n > 0:
			deq.append(1 << i)
		if k < len(deq):
			f = 0
			print('NO')
			break
	l = []
	k -= len(deq)
	while k > 0:
		a = deq.popleft()
		if a == 1:
			deq.append(1)
		else:
			deq.append(a // 2)
			deq.append(a // 2)
			k -= 1
	if f:
		print('YES')
		for i in deq:
			print(i, end=' ')
		print()


import math
(n, k) = map(int, input().split())
s = bin(n)
t = s[2:]
l = t[::-1]
c = []
for j in range(len(l)):
	if l[j] == '1':
		c.append(int(math.pow(2, j)))
a = []
if k < len(c):
	print('NO')
elif k > n:
	print('NO')
else:
	print('YES')
	n -= k
	a = [1] * k
	i = 0
	while i < k and n > 0:
		while a[i] <= n:
			n -= a[i]
			a[i] *= 2
		i += 1
	print(*a)


(n, k) = [int(i) for i in input().split()]
a = [0] * 33
c = 0
for i in range(33):
	if n >> i & 1 == 1:
		a[i] += 1
		c += 1
if c > k:
	print('NO')
else:
	pos = 32
	while c < k and pos > 0:
		if a[pos] == 0:
			pos -= 1
			continue
		c += 1
		a[pos] -= 1
		a[pos - 1] += 2
	if c != k:
		print('NO')
	else:
		print('YES')
		for i in range(33):
			for j in range(a[i]):
				print(1 << i, end=' ')


(n, k) = list(map(int, input().split()))
n = bin(n)[2:]
cont = 0
for i in n:
	if i == '1':
		cont += 1
n = list(map(int, n))
k -= cont
while k > 0:
	for i in range(len(n)):
		if n[i] != 0:
			if i + 1 >= len(n):
				print('NO')
				exit(0)
			else:
				n[i + 1] += 2
				n[i] -= 1
				k -= 1
				break
if k == 0:
	print('YES')
	res = ''
	cont = 0
	for i in range(len(n) - 1, -1, -1):
		res = res + (str(2 ** cont) + ' ') * n[i]
		cont += 1
	print(res)
else:
	print('NO')


import math
(n, k) = map(int, input().split())
nn = n
kk = k
g = n - (k - 1)
if g <= 0:
	print('NO')
else:
	l = int(math.log(g, 2))
	c = 2 ** l
	li = list()
	while n > 0 and k > 0:
		if c + k - 1 <= n:
			li.append(c)
			k -= 1
			n -= c
		else:
			g = n - (k - 1)
			if g <= 0:
				print('NO')
				exit(0)
			l = int(math.log(g, 2))
			c = 2 ** l
	if sum(li) != nn:
		print('NO')
		exit(0)
	print('YES')
	for i in li:
		print(i, end=' ')


(n, k) = map(int, input().split())
a = []
p = n
while n > 0:
	a.append(n % 2)
	n //= 2
i = len(a) - 1
if sum(a) <= k <= p:
	while sum(a) < k:
		if a[i] == 0:
			i -= 1
		else:
			a[i - 1] += 2
			a[i] -= 1
	print('YES')
	for i in range(len(a)):
		print((str(2 ** i) + ' ') * a[i], end='')
else:
	print('NO')


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
if n < k or bin(n)[1:].count('1') > k:
	print('NO')
else:
	print('YES')
	s = k
	ans = [1] * k
	for i in range(k):
		while s + ans[i] <= n:
			s += ans[i]
			ans[i] *= 2
	print(*ans)


(n, k) = map(int, input().split())
binN = list(map(int, bin(n)[2:]))
c = binN.count(1)
if k < c or k > n:
	print('NO')
else:
	i = 0
	while i < len(binN) - 1 and c < k:
		while binN[i] > 0 and c < k:
			c = c + 1
			binN[i] = binN[i] - 1
			binN[i + 1] = binN[i + 1] + 2
		i = i + 1
	i = len(binN) - 1
	output = []
	while i >= 0:
		while binN[i] > 0:
			output.append(2 ** (len(binN) - i - 1))
			binN[i] = binN[i] - 1
		i = i - 1
	print('YES')
	print(' '.join(map(str, output)))


from math import log2
from queue import Queue
(n, k) = map(int, input().split(' '))

def find_pows(x):
	ps = []
	i = 1
	while i <= x:
		if i & x:
			ps.append(i)
		i <<= 1
	return ps
res = find_pows(n)
res = sorted(res)
dp_look = {}
if len(res) > k:
	print('NO')
elif len(res) == k:
	print('YES')
	res = map(str, res)
	print(' '.join(res))
else:
	k -= len(res)
	ans_set = [i for i in res]
	ans_set = sorted(ans_set, reverse=True)
	final_ans = []
	q = Queue()
	for num in ans_set:
		q.put(num)
	while k > 0 and q.empty() == False:
		tmp = q.get()
		if tmp == 1:
			final_ans.append(1)
		else:
			tmp //= 2
			k += 1
			q.put(tmp)
			q.put(tmp)
			k -= 2
	if k > 0:
		print('NO')
	else:
		print('YES')
		while q.empty() == False:
			print(q.get(), end=' ')
		final_ans = map(str, final_ans)
		print(' '.join(final_ans))


from sys import stdin, stdout
from math import *
from heapq import *
from collections import *

def main():
	(n, k) = [int(x) for x in stdin.readline().split()]
	if k > n:
		stdout.write('NO')
		return 0
	a = []
	for i in range(34):
		a.append(int(n >> i & 1 == 1))
	k = k - sum(a)
	if k < 0:
		stdout.write('NO')
		return 0
	i = 33
	while k > 0:
		while i > 0:
			if a[i] == 0:
				i = i - 1
			else:
				break
		if i <= 0:
			stdout.write('NO')
			return 0
		a[i] = a[i] - 1
		a[i - 1] = a[i - 1] + 2
		k = k - 1
	res = []
	for i in range(33):
		while a[i] > 0:
			a[i] = a[i] - 1
			res.append(str(1 << i))
	stdout.write('\n'.join(['YES'] + [' '.join(res)]))
	return 0
main()


from collections import defaultdict, OrderedDict
from functools import reduce
from bisect import insort
mi = lambda : [int(i) for i in input().split()]
flat = lambda l: reduce(lambda a, b: a + b, l)
(n, k) = mi()
pows = [2 ** i for i in range(0, 32 + 1)]
rep = dict.fromkeys(pows, 0)
p = pows[-1]
while n:
	while pows and pows[-1] > n:
		pows.pop(-1)
	n -= pows[-1]
	rep[pows[-1]] += 1
cnt = sum(rep.values())
while cnt < k and p != 1:
	need = min(k - cnt, rep[p])
	rep[p] -= need
	p //= 2
	rep[p] += need * 2
	cnt += need
if cnt != k:
	print('NO')
else:
	print('YES')
	print(*flat([[k] * v for (k, v) in rep.items()]))


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest
from math import ceil, floor, log, log2, sqrt, gcd, factorial

def binNumber(n, size=1):
	return bin(n)[2:].zfill(size)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())

class pair:

	def __init__(self, f, s):
		self.fi = f
		self.se = s

	def __lt__(self, other):
		return (self.fi, self.se) < (other.fi, other.se)
(n, k) = isp()
m = floor(log2(n))
rem = n % 2 ** m
a = [2 ** m]
while m >= 0:
	m -= 1
	if rem // 2 ** m > 0:
		a.append(2 ** m)
	rem = rem % 2 ** m
if len(a) > k or n < k:
	print('NO')
	quit()
i = 0
while len(a) != k:
	while a[i] == 1:
		i += 1
	a[i] //= 2
	a.insert(i, a[i])
print('YES')
print(' '.join(list(map(str, a))))


from sys import stdin, stdout
import sys
from bisect import bisect_left, bisect_right
import heapq
(n, k) = stdin.readline().strip().split(' ')
(n, k) = (int(n), int(k))
ctr = 0
c = 1
arr = []
while c <= n:
	if c & n != 0:
		arr.append(-1 * c)
	c = c * 2

def disp(arr):
	for i in arr:
		stdout.write(str(-1 * i) + ' ')
	stdout.write('\n')
k = k - len(arr)
if k < 0:
	stdout.write('NO\n')
elif k == 0:
	stdout.write('YES\n')
	disp(arr)
else:
	heapq.heapify(arr)
	flag = True
	for i in range(k):
		x = heapq.heappop(arr)
		if x == -1:
			flag = False
			break
		else:
			heapq.heappush(arr, x // 2)
			heapq.heappush(arr, x // 2)
	if flag:
		stdout.write('YES\n')
		disp(arr)
	else:
		stdout.write('NO\n')


from collections import Counter
(n, k) = list(map(int, input().split()))
s = bin(n)[2:]
c = Counter(s)
if k > n or c['1'] > k:
	print('NO')
else:
	print('YES')
	c = Counter()
	i = 1
	t = 0
	for e in reversed(s):
		if e == '1':
			c[i] += 1
			t += 1
		i *= 2
	max_i = i
	while t < k:
		if c[i] == 0:
			i //= 2
			continue
		if c[i] + t <= k:
			c[i // 2] += c[i] * 2
			t += c[i]
			c[i] = 0
			i //= 2
		else:
			c[i // 2] += (k - t) * 2
			c[i] -= k - t
			break
	i = 1
	r = []
	while i <= max_i:
		if c[i] > 0:
			r += [i] * c[i]
		i *= 2
	print(' '.join(map(str, r)))


import math

def sum_powers_of_two(target, powers_count):
	if powers_count > target:
		print('NO')
		return
	powers = []
	for i in range(math.ceil(math.log2(target)) + 1):
		if target & 2 ** i:
			powers.append(2 ** i)
	if len(powers) > powers_count:
		print('NO')
		return
	i = 0
	while len(powers) < powers_count:
		if powers[i] != 1:
			powers[i] //= 2
			powers.append(powers[i])
		if powers[i] == 1:
			i += 1
	print('YES')
	print(' '.join(list(map(str, powers))))
(n, k) = list(map(int, input().split()))
sum_powers_of_two(n, k)


(n, k) = map(int, input().split())
if n < k:
	print('NO')
else:
	sum = k
	A = [1 for i in range(k)]
	i = k - 1
	while i >= 0:
		while sum + A[i] <= n:
			sum += A[i]
			A[i] *= 2
		i -= 1
	if sum != n:
		print('NO')
	else:
		print('YES')
		for i in range(0, k, 1):
			print(A[i], end=' ')


import math
(n, k) = map(int, input().split())
ans = []
while n > 0:
	value = 2 ** int(math.log2(n))
	ans.append(value)
	n -= value
if len(ans) == k:
	print('YES')
	print(*ans)
elif len(ans) > k:
	print('NO')
else:
	ans.sort()
	maxi = 0
	for i in range(len(ans)):
		maxi += ans[i]
	if k > maxi:
		print('NO')
	else:
		print('YES')
		i = 0
		kt = len(ans)
		while i < len(ans) and kt != k:
			if ans[i] != 1:
				ans[i] //= 2
				kt += 1
				ans.append(ans[i])
			else:
				i += 1
		print(*ans)


(n, k) = (int(x) for x in input().split())
answer = [1] * k
n -= k
i = 0
while i < k and n:
	while answer[i] <= n:
		n -= answer[i]
		answer[i] *= 2
	i += 1
if n:
	print('NO')
else:
	print('YES')
	print(*answer)


class Heap:

	def __init__(self, arr=[], key=None, heap_type='min'):
		self.arr = arr
		self.key = key
		self.heap_type = heap_type
		if key == None:
			self.key = lambda x: x
		self.heapify()

	def __repr__(self):
		return str(self.arr)

	def __compare(self, index1, index2):
		return self.__compare_keys(self[index1], self[index2])

	def __compare_keys(self, key1, key2):
		ans = 0
		if key1 > key2:
			ans = 1
		elif key1 < key2:
			ans = -1
		else:
			ans = 0
		return ans if self.heap_type == 'min' else -1 * ans

	def heapify(self):
		for i in range(0, len(self)):
			self.__bubble_up(i)

	def insert(self, item):
		self.arr.append(item)
		self.__bubble_up(len(self) - 1)

	def __getitem__(self, index):
		return self.key(self.arr[index])

	def __bubble_up(self, index):
		parent = (index - 1) // 2
		while parent >= 0 and self.__compare(index, parent) == -1:
			(self.arr[parent], self.arr[index]) = (self.arr[index], self.arr[parent])
			(index, parent) = (parent, (parent - 1) // 2)

	def __bubble_down(self, index):
		high = len(self)
		while True:
			(l, r) = (index * 2 + 1, index * 2 + 2)
			if r < high:
				if self.__compare(r, l) == -1:
					if self.__compare(r, index) >= 0:
						break
					(self.arr[r], self.arr[index]) = (self.arr[index], self.arr[r])
					index = r
				else:
					if self.__compare(l, index) >= 0:
						break
					(self.arr[l], self.arr[index]) = (self.arr[index], self.arr[l])
					index = l
			elif l < high:
				if self.__compare(l, index) >= 0:
					break
				(self.arr[l], self.arr[index]) = (self.arr[index], self.arr[l])
				break
			else:
				break

	def __len__(self):
		return len(self.arr)

	def pop(self):
		(self.arr[0], self.arr[-1]) = (self.arr[-1], self.arr[0])
		top = self.arr.pop(-1)
		self.__bubble_down(0)
		return top
from math import log2
(n, k) = tuple(map(int, input().split()))
if k > n:
	print('NO')
else:
	powers = Heap(heap_type='max')
	while n != 0:
		x = int(log2(n))
		powers.insert(pow(2, x))
		n = n - pow(2, x)
	if len(powers) > k:
		print('NO')
	else:
		while len(powers) != k:
			g = powers.pop()
			powers.insert(g // 2)
			powers.insert(g // 2)
		print('YES')
		print(*powers)


(n, k) = map(int, input().split())
h = [int(_) for _ in bin(n)[2:]]
plz = list(reversed(h))
options = []
i = 0
for char in range(len(plz)):
	if plz[char] == 1:
		options.append(2 ** char)
if len(options) > k:
	print('NO')
else:
	while len(options) < k:
		try:
			if options[i] != 1:
				half = options[i] / 2
				del options[i]
				options.append(half)
				options.append(half)
			else:
				i += 1
		except IndexError:
			print('NO')
			break
	if len(options) == k:
		print('YES')
		printable = list(map(str, map(int, options)))
		print(' '.join(printable))


import math
(n, k) = map(int, input().split())
setbits = bin(n).count('1')
if n < k or k < setbits:
	print('NO')
else:
	print('YES')
	n += 1
	while k:
		p = math.floor(math.log(n - k, 2))
		n -= 2 ** p
		print(2 ** p, end=' ')
		k -= 1


import math

def block(n, k):
	v = []
	count = 0
	while n > 0:
		if int(n % 2) == 1:
			count += 1
		v.append(int(n % 2))
		n = int(n / 2)
	if count == k:
		print('YES')
		for i in range(0, len(v)):
			if v[i] == 1:
				print(2 ** i, end=' ')
		exit()
	j = []
	flag = 0
	for i in range(len(v)):
		if v[i] == 1:
			j.append(i)
	j.sort(reverse=True)
	d = 0
	i = 0
	p = len(j)
	while i < k:
		if j[i] == 0:
			i += 1
			continue
		j[i] -= 1
		j.append(j[i])
		if len(j) == k:
			flag = 1
			break
		if j[i] == 0:
			i += 1
	if flag == 0:
		print('NO')
		exit()
	j.sort()
	print('YES')
	for i in range(len(j)):
		print(2 ** j[i], end=' ')

def Log2(x):
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))
(n, k) = [int(i) for i in input().split()]
if k == 1:
	if isPowerOfTwo(n):
		print('YES')
		print(n)
		exit()
	else:
		print('NO')
		exit()
if n < k:
	print('NO')
	exit()
block(n, k)


import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(N, K) = getIntList()
if K > N:
	print('NO')
	sys.exit()
t = N
c = 0
while t > 0:
	c += t % 2
	t //= 2
if c > K:
	print('NO')
	sys.exit()
t = N
zr = [0 for i in range(40)]
zr[0] = N
for i in range(32):
	if t == K:
		break
	up = min(t - K, zr[i] // 2)
	t -= up
	zr[i] -= up * 2
	zr[i + 1] = up
dprint(zr)
print('YES')
zs = []
for i in range(40):
	zs += [str(2 ** i) for t in range(zr[i])]
ss = ' '.join(zs)
print(ss)


def count(a):
	result = 0
	while a != 0:
		if a % 2 == 1:
			result += 1
		a //= 2
	return result
(n, k) = map(int, input().split())
if count(n) > k or k > n:
	print('NO')
	exit(0)
components = []
a = n
while a != 0:
	components.append(a % 2)
	a //= 2
for i in range(len(components)):
	components[i] *= 2 ** i
i = 0
currentResult = count(n)
while currentResult < k:
	if components[i] > 1:
		components[i] //= 2
		components.append(components[i])
		currentResult += 1
	else:
		i += 1
print('YES')
for i in range(len(components)):
	if components[i] != 0:
		print(components[i], end=' ')


import functools
import heapq
(n, k) = [int(i) for i in input().split()]
s = '{0:b}'.format(n)
if k < s.count('1') or k > n:
	print('NO')
else:
	print('YES')
	t = [2 ** i * -1 for (i, v) in enumerate(s[::-1]) if v == '1']
	heapq.heapify(t)
	while len(t) < k:
		x = heapq.heappop(t)
		heapq.heappush(t, x >> 1)
		heapq.heappush(t, x >> 1)
	print(' '.join((str(i) for i in [-1 * i for i in t])))


t = 1
from heapq import heappop, heappush
for test in range(t):
	(n, k) = map(int, input().split())
	binary = bin(n)[2:]
	dig = []
	counter = 0
	for i in range(len(binary)):
		if binary[-(i + 1)] == '1':
			heappush(dig, -pow(2, counter))
		counter += 1
	left = k - len(dig)
	ans = 'YES'
	if left < 0:
		print('NO')
		continue
	while left > 0:
		el = heappop(dig)
		if el == -1:
			ans = 'NO'
			break
		else:
			heappush(dig, el // 2)
			heappush(dig, el // 2)
			left -= 1
	print(ans)
	if ans == 'YES':
		for i in dig:
			print(-i, end=' ')


from collections import deque
d = deque()
(n, k) = map(int, input().split())
s = bin(n)[2:]
m = s.count('1')
if m <= k <= n:
	print('YES')
	s = s[::-1]
	for i in range(len(s)):
		if s[i] == '1':
			d.append(1 << i)
	r = k - len(d)
	while r != 0:
		x = d.pop()
		if x % 2 == 0:
			d.append(x // 2)
			d.append(x // 2)
			r -= 1
			continue
		else:
			d.appendleft(x)
	print(' '.join((str(b) for b in d)))
else:
	print('NO')


import sys
(n, k) = [int(s) for s in input().split()]
copy_n = n
counter = 1
while 2 ** counter < n:
	counter += 1
if 2 ** counter != n:
	counter -= 1
n -= 2 ** counter
array = [0] * (counter + 1)
array[counter] = 1
for i in range(len(array) - 1, -1, -1):
	if n >= 2 ** i:
		array[i] += 1
		n -= 2 ** i
if sum(array) > k or copy_n // k == 0:
	print('NO')
	sys.exit(0)
print('YES')
diff = k - sum(array)
while diff != 0:
	array[counter - 1] += 2
	array[counter] -= 1
	if array[counter] == 0:
		counter -= 1
	diff -= 1
answer = []
for i in range(len(array)):
	for j in range(array[i]):
		answer.append(str(2 ** i))
print(' '.join(answer))


from heapq import *
(n, k) = map(int, input().split())
b = bin(n)[2:][::-1]
ar = []
for i in range(len(b)):
	if int(b[i]):
		ar.append(-2 ** i)
heapify(ar)
if n < k or len(ar) > k:
	print('NO')
else:
	while len(ar) != k:
		e = heappop(ar)
		heappush(ar, e // 2)
		heappush(ar, e // 2)
	print('YES')
	print(*map(abs, ar))


pt = [2 ** x for x in range(31)]

def min_powers_of_two(n, l=[]):
	for i in range(31):
		if pt[i] == n:
			l.append(pt[i])
			return l
		elif pt[i] > n:
			l.append(pt[i - 1])
			return min_powers_of_two(n - pt[i - 1], l)

def k_powers_of_two(k, l, lsize):
	d = k - lsize
	if d == 0:
		return l
	else:
		l2 = []
		for li in l:
			if lsize < k and li != 1:
				l2.append(li // 2)
				l2.append(li // 2)
				lsize += 1
			else:
				l2.append(li)
		return k_powers_of_two(k, l2, lsize)
(n, k) = map(int, input().split())
if n < k:
	print('NO')
else:
	l = min_powers_of_two(n)
	if len(l) <= k:
		print('YES')
		print(*k_powers_of_two(k, l, len(l)))
	else:
		print('NO')


import math
(n, k) = [int(x) for x in input().split()]
ones = bin(n)[2:].count('1')
if not n >= k >= ones:
	print('NO')
else:
	print('YES')
	n += 1
	while k:
		curr = 2 ** math.floor(math.log(n - k, 2))
		print(curr, end=' ')
		n -= curr
		k -= 1


(n, k) = tuple(map(int, input().split()))
b = bin(n)[2:]
count = 0
d = dict()
for i in range(1, len(b) + 1):
	if b[-i] == '1':
		d[i - 1] = 1
		count += 1
for i in range(max(d.keys()) - 1, -1, -1):
	if i not in d.keys():
		d[i] = 0
if k > n or k < count:
	print('NO')
else:
	print('YES')
	for i in range(k - count):
		max_key = max(d.keys())
		d[max_key] = d[max_key] - 1
		d[max_key - 1] = d[max_key - 1] + 2
		if d[max_key] == 0:
			d.pop(max_key)
	A = list(d.items())
	for item in A:
		for i in range(item[1]):
			print(2 ** item[0], end=' ')


def main():
	arr = input().split()
	total = int(arr[0])
	count = int(arr[1])
	store = []
	test = 1
	while test <= total:
		if test & total:
			store.append(test)
		test *= 2
	if len(store) > count:
		print('NO')
	else:
		position = 0
		while len(store) != count:
			if store[position] % 2 == 0:
				store[position] //= 2
				store.append(store[position])
			else:
				position += 1
			if position == len(store):
				break
		if len(store) == count:
			print('YES')
			string = ''
			for x in store:
				string += str(x) + ' '
			print(string)
		else:
			print('NO')
main()


import math

def last_power_2(n):
	log2 = math.log(n, 2)
	return 2 ** int(log2)

def f(res):
	i = 0
	while i < len(res):
		n = res[i]
		a = last_power_2(res[i])
		if n - a == 0:
			break
		elif i + 1 == len(res):
			return False
		else:
			res[i] = a
			res[i + 1] = n - a
		i += 1
	if i < len(res):
		j = 0
		i += 1
		while j < len(res) and i < len(res):
			if res[j] == 1:
				j += 1
			else:
				m = res[j]
				res[i] = m // 2
				res[j] = m // 2
				i += 1
		return True
(n, k) = [int(i) for i in input().strip().split(' ')]
res = [0] * k
res[0] = n
if n >= k and f(res):
	print('YES')
	assert sum(res) == n
	print(' '.join((str(i) for i in res)))
else:
	print('NO')


from collections import deque
n_k = list(map(int, input().split()))
(n, k) = n_k
bin_n = bin(n)
parts = deque()
for (ind, elem) in enumerate(bin_n[2:]):
	if elem == '1':
		temp = '0b1' + '0' * (len(bin_n) - ind - 3)
		parts.append(int(temp, 2))
if k < len(parts) or n < k:
	print('NO')
elif k == len(parts):
	print('YES')
	print(*parts)
else:
	rem = k - len(parts)
	while rem != 0:
		part = parts.popleft()
		if part > 1:
			part = part >> 1
			parts.append(part)
			parts.append(part)
			rem -= 1
		else:
			parts.append(part)
	print('YES')
	print(*parts)


def no():
	print('NO')
	exit(0)
(n, k) = map(int, input().split())
bina = list(map(int, bin(n)[2:]))
cur = bina.count(1)
if k > n or cur > k:
	no()
while cur < k:
	index = bina.index(next((x for x in bina if x > 0)))
	to = index
	while to < len(bina) - 1 and pow(2, to - index + 1) - 1 <= k - cur:
		to += 1
	if to == index:
		no()
	bina[index] -= 1
	bina[to] += pow(2, to - index)
	cur += pow(2, to - index) - 1
print('YES')
for i in range(len(bina)):
	num = pow(2, len(bina) - i - 1)
	for j in range(bina[i]):
		print(num, end=' ')


(n, k) = map(int, input().split())
A = []
for i in range(30, -1, -1):
	if n >= 1 << i:
		n -= 1 << i
		A.append(1 << i)
for i in range(k):
	while len(A) < k and i < len(A) and (A[i] > 1):
		A.append(A[i] // 2)
		A[i] //= 2
if len(A) != k:
	print('NO')
else:
	print('YES')
	print(*A)


def func(n, k):
	total = k
	arr = [1 for i in range(k)]
	i = k - 1
	while i >= 0:
		while total + arr[i] <= n:
			total += arr[i]
			arr[i] *= 2
		i -= 1
	if total != n:
		print('NO')
	else:
		print('YES')
		for i in range(0, k, 1):
			print(arr[i], end=' ')
(n, k) = list(map(int, input().split()))
func(n, k)


from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
from math import *
from collections import defaultdict as dd, deque

def data():
	return sys.stdin.readline().strip()

def mdata():
	return map(int, data().split())
(n, k) = mdata()
d = dd(int)
b = bin(n)[2:]
a = 0
for i in range(len(b)):
	if b[i] == '1':
		a += 1
		d[len(b) - 1 - i] += 1
if k < a or k > n:
	print('NO')
else:
	while a < k:
		for i in d:
			if d[i] > 0 and i != 0:
				d[i] -= 1
				d[i - 1] += 2
				a += 1
				break
	print('YES')
	l = []
	for i in sorted(d.keys()):
		l += [int(pow(2, i))] * d[i]
	print(*l)


ran = input()
ran = ran.split()
n = int(ran[0])
k = int(ran[1])
bin = format(n, 'b')
binary = [int(i) for i in bin]
if k > n:
	print('NO')
elif sum(binary) > k:
	print('NO')
else:
	print('YES')
	l = [2 ** i for i in range(0, len(binary)) if binary[len(binary) - i - 1] == 1]
	dl = len(l)
	cur_ind = 0
	while dl < k:
		if l[cur_ind] > 1:
			l[cur_ind] = l[cur_ind] / 2
			l.append(l[cur_ind])
			dl = len(l)
		else:
			cur_ind += 1
	l = [str(int(i)) for i in l]
	print(' '.join(l))


(n, k) = map(int, input().split())
a = list((eval(i) for i in str(bin(n))[2:]))
l = a.count(1)
end = []
if l > k:
	print('NO')
	quit()
while l < k:
	if len(a) == 1:
		print('NO')
		quit()
	a[0] = a[0] - 1
	a[1] = a[1] + 2
	l += 1
	if a[0] == 0:
		a = a[1:]
else:
	l = len(a)
	for i in range(l):
		for k in range(a[i]):
			end.append(str(2 ** (l - 1 - i)))
print('YES')
print(' '.join(end))


(n, k) = map(int, input().split())
b = bin(n)[2:][::-1]
t = b.count('1')
if k < t:
	print('NO')
	exit(0)
(s, i) = ([], 1)
for j in b:
	if j == '1':
		s.append(i)
	i *= 2
j = len(s) - 1
ans = []
while k - t > 0:
	if s[j] != 1:
		s[j] //= 2
		s.append(s[j])
		t += 1
		j += 1
	elif j == 0:
		break
	else:
		ans.append(str(s[j]))
		del s[j]
		j -= 1
print('YES\n' + ' '.join(map(str, ans + s)) if len(s) + len(ans) == k else 'NO')


(n, k) = map(int, input().split())

def binary(n):
	l = []
	while n > 0:
		l.append(n % 2)
		n = n // 2
	return l
s = 0
t = 0
l = binary(n)
for i in range(len(l)):
	if l[i]:
		s += 2 ** i
		t += 1
if s >= k and t <= k:
	print('YES')
	i = len(l) - 1
	while t != k:
		if t + l[i] <= k:
			t += l[i]
			l[i - 1] += 2 * l[i]
			l[i] = 0
		else:
			temp = k - t
			l[i] -= temp
			l[i - 1] += 2 * temp
			t += temp
		i -= 1
	for i in range(len(l)):
		if l[i]:
			print((str(2 ** i) + ' ') * l[i], end='')
else:
	print('NO')


import heapq
(n, k) = map(int, input().split())
pq = []
for i in range(32):
	if n & 1 << i > 0:
		heapq.heappush(pq, -(1 << i))
while len(pq) < k:
	v = heapq.heappop(pq)
	v = -v
	if v == 1:
		pq = []
		break
	heapq.heappush(pq, -(v >> 1))
	heapq.heappush(pq, -(v >> 1))
if len(pq) != k:
	print('NO')
else:
	print('YES')
	print(' '.join((str(-x) for x in pq)))


import sys, math
from collections import defaultdict
(n, k) = [int(__) for __ in input().split()]
lr = list()
nn = n
while nn:
	l = math.floor(math.log(nn, 2))
	nn -= 2 ** l
	lr.append(l)
if k < len(lr) or k > n:
	print('NO')
	exit()
else:
	numz = 0
	while len(lr) + numz < k:
		x = lr.pop()
		if x == 0:
			numz += 1
		elif x == 1:
			numz += 2
		else:
			lr.append(x - 1)
			lr.append(x - 1)
print('YES')
print(' '.join([str(2 ** x) for x in lr] + ['1'] * numz))


(n, k) = list(map(int, input().split()))
x = []
ones = 0
while n:
	if n % 2 == 0:
		x.append(0)
	else:
		x.append(1)
		ones += 1
	n = int(n / 2)
x.reverse()
n = ones
if n > k:
	print('NO')
else:
	for i in range(len(x)):
		if n == k:
			break
		if x[i] != 0 and i + 1 < len(x):
			if n + x[i] <= k:
				n += x[i]
				x[i + 1] += 2 * x[i]
				x[i] = 0
			else:
				x[i] -= k - n
				x[i + 1] += 2 * (k - n)
				n = k
	if n != k:
		print('NO')
	else:
		print('YES')
		for i in range(0, len(x)):
			while x[i] != 0:
				print(pow(2, len(x) - 1 - i), end=' ')
				x[i] -= 1


(n, k) = map(int, input().split())
if n < k:
	print('NO')
else:
	le = len(bin(n)) - 3
	st = 1
	li = []
	for i in range(le + 1):
		if st & n:
			li.append(st)
		st <<= 1
	dif = len(li) - k
	if dif > 0:
		print('NO')
	elif dif == 0:
		print('YES')
		print(*li)
	else:
		dif = abs(dif)
		print('YES')
		stack = []
		while dif > 0:
			for i in li:
				if dif == 0:
					print(i, end=' ')
				elif i == 1:
					print(1, end=' ')
				else:
					dif -= 1
					stack.append(i // 2)
					stack.append(i // 2)
			if dif == 0:
				print(*stack)
			li = stack.copy()
			stack = []


(n, k) = map(int, input().split())
s = bin(n)[2:]
s = list(s)
c = 0
for i in range(len(s)):
	s[i] = int(s[i])
	if s[i] == 1:
		c += 1
if c == k:
	s.reverse()
	ans = []
	i = 0
	p = 1
	while i < len(s):
		while s[i] > 0:
			ans.append(p)
			s[i] -= 1
		i += 1
		p *= 2
	print('YES')
	print(*ans)
elif c < k:
	l = len(s)
	tf = True
	ind = s.index(1)
	while c < k:
		s[ind] -= 1
		if ind + 1 < l:
			s[ind + 1] += 2
			c += 1
			if s[ind] == 0:
				ind += 1
		else:
			tf = False
			break
	if tf:
		print('YES')
		s.reverse()
		ans = []
		i = 0
		p = 1
		while i < len(s):
			while s[i] > 0:
				ans.append(p)
				s[i] -= 1
			i += 1
			p *= 2
		print(*ans)
	else:
		print('NO')
else:
	print('NO')


(n, k) = map(int, input().split())
r = [1] * k
s = k
for i in range(k):
	while r[i] + s <= n:
		s += r[i]
		r[i] *= 2
if s == n:
	print('YES')
	r = sorted(r)
	print(*r)
else:
	print('NO')


(n, k) = map(int, input().split())
st = []
ones = bin(n).count('1')
if k == 1:
	if ones == 1:
		print('YES')
		print(n)
	else:
		print('NO')
elif ones > k:
	print('NO')
else:
	po = 0
	bi = bin(n)[2:]
	for i in range(len(bi) - 1, -1, -1):
		if bi[i] == '1' and po != 0:
			st.append(2 ** po)
		po += 1
	st.sort()
	excess = k - ones
	ans = []
	if excess == 0:
		print('YES')
		if n % 2 == 1:
			st.append(1)
		print(' '.join(map(str, st)))
	elif sum(st) < excess:
		print('NO')
	else:
		ans = []
		while excess > 0 and len(st) != 0:
			curr = st[-1]
			st.pop()
			if curr // 2 > 1:
				st.append(curr // 2)
				st.append(curr // 2)
			excess -= 1
		if excess != 0:
			print('NO')
		else:
			ans = [i for i in st]
			rem = n - sum(ans)
			for j in range(rem):
				ans.append(1)
			print('YES')
			print(' '.join(map(str, ans)))


import math
(n, k) = map(int, input().split())
lis = []
if n < k:
	print('NO')
else:
	while n > 0 and k > 0:
		x = n - k + 1
		y = int(math.log(x, 2))
		lis.append(2 ** y)
		n -= 2 ** y
		k -= 1
	if n != 0:
		print('NO')
	else:
		print('YES', end=' ')
		for i in lis:
			print(i, end=' ')


(n, k) = map(int, input().split())
a = bin(n)[2:]
c = 0
l = []
for i in range(len(a)):
	if a[i] == '1':
		c += 1
		l.append(pow(2, len(a) - i - 1))
if c == k:
	print('YES')
	s = ''
	for i in l:
		s += str(i) + ' '
	print(s)
elif c < k:
	i = 0
	while c != k and i < len(l):
		a = l[i] // 2
		if a != 0:
			l[i] = a
			l.insert(i, a)
			c += 1
		else:
			i += 1
	if c == k:
		print('YES')
		s = ''
		for i in l:
			s += str(i) + ' '
		print(s)
	else:
		print('NO')
else:
	print('NO')


(n, k) = map(int, input().split())
a = [1]
i = 2
while i <= n:
	a.append(i)
	i *= 2
ans = []
j = len(a) - 1
x = n
while x != 0:
	if x >= a[j]:
		x -= a[j]
		ans.append(a[j])
	else:
		j -= 1
mk = len(ans)
ans = ans[::-1]
c = 0
if k >= mk and k <= n:
	i = mk
	j = mk - 1
	while i < k:
		if ans[j] > 2:
			y = ans.pop()
			ans.append(y // 2)
			ans.append(y // 2)
			j += 1
		elif ans[j] == 2:
			y = ans.pop()
			j -= 1
			c += 1
		i += 1
	print('YES')
	for i in range(c):
		print('1 1', end=' ')
	for ele in ans:
		print(ele, end=' ')
else:
	print('NO')


from sys import stdin, stdout
(a, b) = map(int, stdin.readline().split())
shan = [1] * b
a -= b
i = 0
while i < b and a:
	while shan[i] <= a:
		a -= shan[i]
		shan[i] *= 2
	i += 1
if a:
	print('NO')
else:
	print('YES')
	print(*shan)


i = 0
b = []
while 2 ** i < 10 ** 9:
	b.append(2 ** i)
	i += 1
ans = []
(n, k) = map(int, input().split())
temp = n
for i in reversed(b):
	while k > 0 and n - i >= k - 1:
		ans.append(i)
		k -= 1
		n -= i
if sum(ans) != temp:
	print('NO')
else:
	print('YES')
	print(*ans)


(n, k) = map(int, input().split())
s = n - k
c = []
for i in range(1, 35):
	c.append(pow(2, i) - 1)
c.reverse()
l = []

def supress(c, k):
	l = []
	s = 0
	while k > 0:
		if k >= c[s]:
			k -= c[s]
			l.append(c[s])
		else:
			s += 1
	return l
l = supress(c, s)
if len(l) > k or s < 0:
	print('NO')
else:
	a = [1] * k
	for i in range(len(l)):
		a[i] += l[i]
	print('YES')
	print(*a)


from collections import deque
(n, k) = map(int, input().split())
f = bin(n)[2:]
t = f.count('1')
if k < t or k > n:
	print('NO')
else:
	q = deque()
	p = f[::-1]
	for i in range(len(p)):
		if p[i] == '1':
			q.append(pow(2, i))
	while len(q) != k:
		o = q.pop()
		if o // 2 > 0:
			q.append(o // 2)
			q.append(o // 2)
		else:
			q.appendleft(o)
	l = []
	for i in q:
		l.append(i)
	print('YES')
	l.sort()
	print(*l)


(n, k) = map(int, input().split())
Bin = [0] * 32
One = i = 0
while n > 0:
	if n % 2 == 1:
		Bin[i] = 1
		One += 1
	i += 1
	n //= 2
if One > k:
	print('NO')
	exit()
for i in range(31, 0, -1):
	if One == k:
		break
	if Bin[i] >= 1:
		while Bin[i] != 0 and One < k:
			Bin[i] -= 1
			Bin[i - 1] += 2
			One += 1
if One < k:
	print('NO')
	exit()
print('YES')
res = []
for i in range(31):
	while Bin[i] > 0:
		res.append(str(1 << i))
		Bin[i] -= 1
print(' '.join(res))


(n, k) = map(int, input().split())
st = 1
old_n = n
while st <= n:
	st *= 2
st //= 2
a = list()
while n > 0:
	if n >= st:
		n -= st
		a.append(st)
	else:
		st //= 2
n = old_n
if len(a) > k:
	print('NO')
elif k > n:
	print('NO')
else:
	i = 0
	while len(a) < k:
		if a[i] != 1:
			a[i] //= 2
			a.append(a[i])
		else:
			i += 1
	print('YES')
	print(*a)


import sys

def input():
	return sys.stdin.readline().rstrip('\r\n')

def List():
	return list(map(int, input().split()))

def Num():
	return int(input())

def solve():
	(n, k) = List()
	(tot, i) = (k, k - 1)
	a = [1 for i in range(k)]
	while i >= 0:
		while tot + a[i] <= n:
			tot += a[i]
			a[i] *= 2
		i -= 1
	if tot == n:
		print('YES')
		print(*a)
	else:
		print('NO')
solve()


[n, k] = list(map(int, input().split(' ')))
n_ = n
ans = []
index = 1
while n != 0:
	if n % 2 == 1:
		ans.append(index)
	index *= 2
	n //= 2
if len(ans) <= k and n_ >= k:
	num_1 = 0
	k_ = len(ans)
	while k_ != k:
		if ans[-1] == 1:
			num_1 += 1
			ans = ans[:-1]
			continue
		last = ans[-1]
		ans = ans[:-1]
		ans.append(last // 2)
		ans.append(last // 2)
		k_ += 1
	for _ in range(num_1):
		ans.append(1)
	print('YES')
	print(' '.join(map(str, ans)))
else:
	print('NO')


(n, k) = map(int, input().split())
i = 0
s = bin(n)[2:][::-1]
d = {}
while pow(2, i) <= 10 ** 9:
	d[pow(2, i)] = 0
	i += 1
p = -1
c = 0
flag = 0
for i in range(len(s)):
	if s[i] == '1':
		d[pow(2, i)] = 1
		c += 1
		p = i
m = 0
for i in d.items():
	m += i[1]
x = d.items()
x = sorted(x, key=lambda y: y[0])
x = [list(i) for i in x]
while m < k:
	while p > 0 and x[p][1] > 0 and (m < k):
		m += 1
		x[p - 1][1] += 2
		x[p][1] -= 1
	if p == 0 and m < k:
		flag = 1
		break
	p -= 1
if c > k:
	print('NO')
elif flag == 1:
	print('NO')
else:
	s = ''
	print('YES')
	for i in x:
		if i[1] > 0:
			for _ in range(i[1]):
				print(i[0], end=' ')


def minimum_k(x):
	arr = []
	ans = []
	while x > 0:
		arr.append(x % 2)
		x //= 2
	for i in range(len(arr)):
		if arr[i] == 1:
			ans.append(2 ** i)
	return ans

def solve():
	(n, k) = map(int, input().split())
	result = minimum_k(n)
	min_len = len(result)
	if k < min_len or k > n:
		print('NO')
		return
	i = 0
	while min_len < k:
		while result[i] == 1:
			i += 1
		x = result[i] // 2
		result[i] = x
		result.append(x)
		min_len += 1
	print('YES')
	print(' '.join((str(k) for k in sorted(result))))
solve()


from sys import stdin
import math
import heapq

def myfunction(n, k):
	if n < k:
		print('NO')
		return
	myqueue = []
	binary = list(str(bin(n)))[2:]
	for i in range(len(binary)):
		if binary[i] != '0':
			myqueue.append(-1 * 2 ** (len(binary) - i - 1))
	if len(myqueue) > k:
		print('NO')
		return
	elif len(myqueue) == k:
		print('YES')
		myqueue.sort(reverse=True)
		for p in range(k):
			print(-1 * myqueue[p], end=' ')
		return
	heapq.heapify(myqueue)
	while len(myqueue) != k:
		max_el = heapq.heappop(myqueue)
		if max_el == -1:
			print('NO')
			return
		heapq.heappush(myqueue, max_el // 2)
		heapq.heappush(myqueue, max_el // 2)
		if len(myqueue) == k:
			print('YES')
			myqueue = list(myqueue)
			myqueue.sort(reverse=True)
			for p in range(k):
				print(-1 * myqueue[p], end=' ')
			return
(n, k) = list(map(int, stdin.readline().split()))
myfunction(n, k)


from sys import stdin, stdout
import math
(n, k) = map(int, input().split())
p = bin(n)[2:]
t = p.count('1')
if not n >= k >= t:
	print('NO')
else:
	n += 1
	print('YES')
	while k:
		val = math.floor(math.log(n - k, 2))
		stdout.write(str(2 ** val) + ' ')
		n -= 2 ** val
		k -= 1


def dvoich(n):
	v = []
	import math
	while True:
		x = 2 ** math.trunc(math.log(n, 2))
		v.append(x)
		n -= x
		if n == 0:
			return v
(n, k) = map(int, input().split())
d = sorted(dvoich(n), reverse=True)
f = len(d)
g = 0
m = []
if f > k:
	print('NO')
elif n < k:
	print('NO')
elif f == k:
	print('YES')
	for t in d:
		print(int(t), end=' ')
else:
	print('YES')
	while True:
		try:
			x = d[-1]
		except:
			for t in d:
				print(int(t), end=' ')
			for t in m:
				print(int(t), end=' ')
			exit(0)
		if x == 1:
			d.pop()
			m.append(x)
		elif f < k:
			d.pop()
			d.append(x / 2)
			d.append(x / 2)
			f += 1
		elif f == k:
			for t in d:
				print(int(t), end=' ')
			for t in m:
				print(int(t), end=' ')
			break


(n, k) = list(map(int, input().strip().split()))
l = []
p = 0
nn = n
length = 0
while n:
	if n % 2 == 1:
		l.append(2 ** p)
	p += 1
	n = n // 2
if len(l) <= k <= nn:
	print('YES')
	i = 0
	while 1:
		if len(l) + length == k:
			print(' '.join(map(str, l)))
			break
		if l[0] != 1:
			toappendat0 = l.pop(0) // 2
			l = [toappendat0] * 2 + l
		else:
			length += 1
			print(l.pop(0), end=' ')
else:
	print('NO')


(n, k) = input().split(' ')
n = int(n)
k = int(k)
a = []
temp = 1
while temp <= n:
	a.append(temp)
	temp = temp * 2
if k == 1:
	found = 0
	for i in a:
		if n == i:
			found = 1
			break
	if found:
		print('YES')
		print(n)
	else:
		print('NO')
elif k > n:
	print('NO')
elif k == n:
	print('YES')
	for i in range(n):
		print(1, end=' ')
else:
	value = n
	temp1 = len(a) - 1
	res = []
	temp_sum = 0
	while k > 0:
		temp2 = n - a[temp1]
		if temp2 < k - 1:
			temp1 -= 1
		else:
			temp_sum += a[temp1]
			res.append(a[temp1])
			n -= a[temp1]
			k -= 1
	if temp_sum != value:
		print('NO')
	else:
		print('YES')
		res.sort()
		for i in res:
			print(i, end=' ')


(n, k) = map(int, input().split())
d = dict()
step = 1
kol = 0
while step <= n:
	d[step] = 0
	step *= 2
if step > n:
	step //= 2
while n != 0:
	i = 0
	stepen = 1
	while stepen <= n:
		stepen *= 2
		i += 1
	if stepen > n:
		stepen //= 2
	d[stepen] += 1
	kol += 1
	n -= stepen
if kol > k:
	print('NO')
	exit()
while kol != k:
	if step == 1:
		print('NO')
		exit()
	if d[step] != 0:
		d[step] -= 1
		d[step // 2] += 2
		kol += 1
	else:
		step //= 2
print('YES')
for i in d:
	if d[i] != 0:
		for j in range(d[i]):
			print(i, end=' ')


import sys

def fprint(x):
	print(x, flush=True)

def qprint(x):
	sys.stdout.write(str(x) + '\n')

def input():
	return sys.stdin.readline()
(N, K) = map(int, input().split())
n_bits = format(N, 'b')
n_bits = str(n_bits)
num_1s = n_bits.count('1')
print_list = []
if K < num_1s:
	print('NO')
elif K > N:
	print('NO')
else:
	print('YES')
	for (index, ele) in enumerate(n_bits):
		if ele == '1':
			print_list.append(2 ** (len(n_bits) - index - 1))
	while len(print_list) != K:
		if print_list[0] == 1:
			print(print_list.pop(0), end=' ')
			K -= 1
		else:
			element = print_list.pop(0)
			print_list.append(int(element / 2))
			print_list.append(int(element / 2))
	print(' '.join(map(str, print_list)))


import math

def highestPowerof2(n):
	return int(math.log(n, 2))
(n, k) = map(int, input().split())
if n < k:
	print('NO')
else:
	f = -1
	l = [1] * k
	l[k - 1] = n - (k - 1)
	s = n
	d = 0
	for i in range(k - 1, -1, -1):
		l[i] += d
		w = highestPowerof2(l[i])
		hi = pow(2, w)
		d = l[i] - hi
		if d == 0:
			f = 1
			break
		else:
			l[i] = hi
	if f == -1:
		print('NO')
	else:
		print('YES')
		for z in l:
			print(z, end=' ')


from math import log2
(n, k) = map(int, input().split())
binary = bin(n)[2:]
lbin = binary.count('1')
if n < k or (k is 1 and n is not 1 and (n % 2 is 1)):
	print('NO')
elif lbin > k:
	print('NO')
else:
	l = []
	print('YES')
	lbin = len(binary)
	for i in range(lbin):
		if binary[lbin - i - 1] == '1':
			l.append(pow(2, i))
	i = 0
	while len(l) < k:
		if l[i] % 2 is 0:
			l[i] //= 2
			l.append(l[i])
		else:
			i += 1
	print(*l)


from sys import stdin
(n, m) = map(int, stdin.readline().strip().split())
p = [0 for i in range(30)]
s = bin(n)[::-1]
x = 0
for i in range(len(s)):
	if s[i] == '1':
		p[i] = 1
		x += 1
if x > m:
	print('NO')
	exit(0)
y = 29
while y > 0 and x != m:
	if p[y] > 0:
		x += 1
		p[y] -= 1
		p[y - 1] += 2
	else:
		y -= 1
if x == m:
	print('YES')
	ans = []
	for i in range(len(p)):
		for j in range(p[i]):
			ans.append(2 ** i)
	print(*ans)
else:
	print('NO')


(n, k) = map(int, input().split())
tab = list(map(int, str(bin(n))[2:]))
nb = sum(tab)
n_tab = len(tab)
p = len(tab)
while nb < k and n_tab > 1:
	if tab[p - n_tab] == 0:
		n_tab -= 1
	else:
		tab[p - n_tab] -= 1
		tab[p - n_tab + 1] += 2
		nb += 1
if nb == k:
	print('YES')
	l = []
	for i in range(p):
		for j in range(tab[p - i - 1]):
			l.append(pow(2, i))
	print(' '.join(map(str, l)))
else:
	print('NO')


(n, k) = map(int, input().split())
m = bin(n)
m = m[2:]
if m.count('1') > k:
	print('NO')
elif m.count('1') == k:
	print('YES')
	for i in range(len(m)):
		if m[i] == '1':
			print(2 ** (len(m) - 1 - i), end=' ')
else:
	a = [0] * (len(m) + 1)
	for i in range(len(m)):
		a[i] = int(m[len(m) - i - 1])
	cnt = m.count('1')
	for i in range(len(a) - 1, 0, -1):
		l = min(a[i], k - cnt)
		cnt += l
		a[i - 1] += 2 * l
		a[i] -= l
	if cnt < k:
		print('NO')
	else:
		print('YES')
		for i in range(len(a)):
			while a[i] > 0:
				print(2 ** i, end=' ')
				a[i] -= 1


import math
l1 = input().split()
l1 = [int(i) for i in l1]
n = l1[0]
k = l1[1]
i = 30
s = 0
r = []
while i >= 0 and k:
	m = 1 << i
	if m > n or n - m < k - 1:
		i -= 1
		continue
	s += m
	r.append(m)
	n -= m
	k -= 1
if r.__len__() == l1[1] and s == l1[0]:
	print('YES')
	for e in r:
		print(str(e) + ' ', end='')
else:
	print('NO')


la = list(map(int, input().rstrip().split()))
k = la[1]
n = la[0]
n = bin(n)
n = n[2:]
l = len(n) - 1
result = ''
i = l
finallist = []
while i >= 0:
	if n[i] != '0':
		finallist.append(2 ** (l - i))
	i -= 1
if len(finallist) < k:
	i = len(finallist) - 1
	while i >= 0 and len(finallist) < k:
		if finallist[i] // 2 != 0:
			num = finallist.pop(i) // 2
			finallist.append(num)
			finallist.append(num)
			i = len(finallist) - 1
		else:
			i -= 1
if len(finallist) == k:
	print('YES')
	for res in finallist:
		result += str(res) + ' '
	print(result)
else:
	print('NO')


def dec_to_bin(n):
	ans = ''
	while n // 2 != 0 or n % 2 != 0:
		ans += str(n % 2)
		n //= 2
	return ans[::-1]

def bin_to_dec(n):
	ans = 0
	length = len(n) - 1
	for _ in range(len(n)):
		ans += int(n[_]) * 2 ** length
		length -= 1
	return ans
a = []
(n, k) = map(int, input().split())
init = n
n = dec_to_bin(n)
if n.count('1') > k or k > init:
	print('NO')
	exit()
for i in range(len(n)):
	if n[i] == '1':
		a.append('1' + (len(n) - i - 1) * '0')
k -= len(a)
j = 0
ones_cnt = 0
while k > 0:
	if a[0] != '1':
		if bin_to_dec(a[0]) < k:
			for h in range(bin_to_dec(a[0])):
				ones_cnt += 1
				k -= 1
			k += 2
			del a[0]
		else:
			a.append(dec_to_bin(bin_to_dec(a[0]) // 2))
			a.append(dec_to_bin(bin_to_dec(a[0]) // 2))
			del a[0]
	else:
		ones_cnt += 1
		del a[0]
		k += 1
	k -= 1
print('YES')
for _ in range(len(a)):
	print(bin_to_dec(a[_]), end=' ')
if ones_cnt != 0:
	for b in range(ones_cnt):
		print(1, end=' ')


(n, k) = (int(i) for i in input().split())
p = 0
nD = n
d_arr = []
while nD > 0:
	if nD % 2 == 1:
		d_arr.append(2 ** p)
	nD = nD // 2
	p += 1
flag = False
ones = 0
for i in d_arr:
	if i == 1:
		ones += 1
	else:
		break
while not flag:
	if len(d_arr) == k:
		print('YES')
		print(' '.join((str(i) for i in d_arr)))
		break
	if len(d_arr) > k:
		flag = True
	if len(d_arr) < k:
		if d_arr[-1] == 1:
			flag = True
			continue
		diff = k - len(d_arr)
		n_d_arr = [1] * ones
		i = ones
		while diff > 0 and i < len(d_arr):
			n_d_arr.append(d_arr[i] // 2)
			n_d_arr.append(d_arr[i] // 2)
			if d_arr[i] // 2 == 1:
				ones += 2
			i += 1
			diff -= 1
		if i == len(d_arr):
			tail = []
		else:
			tail = d_arr[i:]
		d_arr = n_d_arr + tail
if flag:
	print('NO')


params = list(map(int, list(input().split())))
n = params[0]
size = params[1]
seq = list(map(int, list(bin(n)[2:])))
u = 0
z = 0
for s in seq:
	if s == 1:
		u += 1
	else:
		z += 1
if size < u or size > n:
	print('NO')
else:
	print('YES')
	r = u
	while r in range(u, size):
		if seq[0] == 0:
			seq.pop(0)
		seq[0] -= 1
		seq[1] += 2
		r += 1
	ans = ''
	for r in range(0, len(seq)):
		ans += (str(2 ** (len(seq) - r - 1)) + ' ') * seq[r]
	print(ans[:-1])


(n, k) = map(int, input().split())
li = {}
tmpn = n
beki = 2 ** 31
s = 0
while beki > 0:
	if tmpn >= beki:
		li[beki] = 1
		tmpn -= beki
		s += 1
	else:
		li[beki] = 0
	beki //= 2
if s > k or n < k:
	print('NO')
	quit()
beki = 2 ** 31
while s != k:
	if li[beki] == 0:
		beki //= 2
	else:
		li[beki] -= 1
		li[beki // 2] += 2
		s += 1
print('YES')
ans = []
for i in li:
	for j in range(li[i]):
		ans.append(i)
print(' '.join(map(str, ans)))


def binary(n, a):
	if n > 1:
		binary(n // 2, a)
	a.append(n % 2)
(n, k) = map(int, input().split())
a = []
binary(n, a)
m1 = 0
m2 = 0
a = a[::-1]
ans = []
m3 = 0
for i in range(len(a)):
	if a[i] == 1:
		m1 += 1
		m2 += 2 ** i
		ans.append(2 ** i)
		m3 += 1
if k >= m1 and k <= n:
	print('YES')
	x = k - m3
	i = 0
	cnt = 0
	while cnt < x:
		if ans[i] != 1:
			ans[i] = ans[i] // 2
			ans.append(ans[i])
			cnt += 1
		else:
			i += 1
	print(*ans)
else:
	print('NO')


(n, k) = map(int, input().split())
bin_exp = [int(x) for x in list(bin(n)[2:])]
if k > n or k < bin_exp.count(1):
	print('NO')
else:
	print('YES')
	while sum(bin_exp) < k:
		bin_exp[0] = bin_exp[0] - 1
		bin_exp[1] = bin_exp[1] + 2
		if bin_exp[0] == 0:
			del bin_exp[0]
	ans = ''
	for x in range(len(bin_exp)):
		ans += (str(2 ** (len(bin_exp) - 1 - x)) + ' ') * bin_exp[x]
	print(ans[:-1])


(n, k) = map(int, input().split())
A = []
PoT = []
for i in range(35):
	temp = 2 ** i
	if n >= temp:
		A.append(0)
		PoT.append(2 ** i)
lenPoT = len(PoT)
temp_k = 0
temp_n = n
IsMAX = True
for i in range(1, lenPoT + 1):
	temp_PoT = PoT[lenPoT - i]
	while temp_n >= temp_PoT:
		temp_n -= temp_PoT
		A[lenPoT - i] += 1
		temp_k += 1
		if IsMAX:
			IndMAX = lenPoT - i
			IsMAX = False
FLAG = True
if temp_k > k:
	FLAG = False
elif temp_k == k:
	FLAG = True
else:
	while temp_k < k:
		if IndMAX >= 1:
			if A[IndMAX] == 0:
				IndMAX -= 1
			else:
				A[IndMAX] -= 1
				A[IndMAX - 1] += 2
				temp_k += 1
		else:
			FLAG = False
			break
len_A = len(A)
if FLAG:
	print('YES')
	for (i, a) in enumerate(A):
		for b in range(a):
			print(2 ** i, end='')
			if i != len_A - 1 or b != a - 1:
				print(' ', end='')
	print()
else:
	print('NO')


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def bincalc(n):
	s = []
	v = 0
	while n:
		r = n % 2
		s.append(r)
		n //= 2
		v += r
	return (s[::-1], v)
(n, k) = list(map(int, input().split()))
(a, v) = bincalc(n)
if v > k or k > n:
	print('NO')
else:
	print('YES')
	c = v
	i = 0
	while c < k:
		if a[i] > 0:
			a[i] -= 1
			a[i + 1] += 2
			c += 1
		else:
			i += 1
	out = []
	a = a[::-1]
	for i in range(len(a)):
		out.extend([2 ** i] * a[i])
	print(*out)


(e, b) = map(int, input().split())
s = []
d = []
a = e
while a:
	s += [a % 2]
	a = a // 2
for i in range(len(s)):
	if s[i]:
		d += [2 ** i]
if b > e or len(d) > b:
	print('NO')
elif e == b:
	print('YES')
	print(e * '1 ')
else:
	i = 0
	while i < len(d) and len(d) != b:
		if d[i] != 1:
			d += [d[i] // 2, d[i] // 2]
			d.pop(i)
		else:
			i += 1
	print('YES')
	d.sort()
	s = ''
	for i in d:
		s += str(i) + ' '
	print(s)


(k, n) = map(int, input().split())
if n > k:
	print('NO')
elif n == k:
	print('YES')
	print('1 ' * n)
else:
	bits = []
	count = 1
	x = 1
	while x < k.bit_length() + 1:
		if k & count:
			bits.append(x - 1)
		count = 1 << x
		x += 1
	if len(bits) > n:
		print('NO')
	else:
		print('YES')
		if len(bits) == n:
			for el in bits:
				print(1 << el, end=' ')
			print()
		elif len(bits) << 1 > n:
			diff = abs(len(bits) - n)
			(ans, count) = ('', 0)
			for x in range(len(bits) - 1, -1, -1):
				if count < diff:
					ans += str(1 << bits[x] - 1) + ' ' + str(1 << bits[x] - 1) + ' '
					count += 1
				else:
					ans += str(1 << bits[x]) + ' '
			print(ans)
		else:
			ans = ''
			hmm = n - len(bits)
			while hmm > 0:
				ans = ''
				current = []
				for el in bits[::-1]:
					cnt = 0
					while True:
						a = (1 << el - cnt) - 1
						if a <= hmm:
							hmm -= a
							ans += (str(1 << cnt) + ' ') * (a + 1)
							current.extend([cnt] * (a + 1))
							break
						cnt += 1
				bits = current
			print(ans)


from collections import deque as dq
from heapq import heappop, heappush, heapify
import heapq

def ans(arr):
	return ' '.join([str(-i) for i in arr])
(n, k) = map(int, input().split())
s = bin(n)[2:]
ones = s.count('1')
if ones <= k and n >= k:
	print('YES')
	arr = []
	heapify(arr)
	i = -1
	m = 0
	while i >= -len(s):
		if s[i] == '1':
			heappush(arr, -1 * pow(2, m))
		m += 1
		i -= 1
	mm = len(arr)
	while mm != k:
		w = heappop(arr)
		heappush(arr, w // 2)
		heappush(arr, w // 2)
		mm += 1
	print(ans(arr))
else:
	print('NO')


import sys
(n, m) = map(int, input().split())
if m > n:
	print('NO')
	sys.exit(0)
l = 1
ct = 0
dic = {}
while n > 0:
	if n % 2:
		dic[l] = 1
		ct += 1
	else:
		dic[l] = 0
	n //= 2
	l *= 2
if m < ct:
	print('NO')
else:
	print('YES')
	q = l
	l //= 2
	while ct != m:
		if ct + dic[l] < m:
			dic[l // 2] += 2 * dic[l]
			ct += dic[l]
			dic[l] = 0
		else:
			dic[l // 2] += 2 * (m - ct)
			dic[l] -= m - ct
			ct = m
		l //= 2
	l = 1
	while l < q:
		print((str(l) + ' ') * dic[l], end='')
		l *= 2
	print()


from fractions import gcd
from itertools import combinations, permutations, accumulate, product
from collections import deque, defaultdict, Counter
import decimal
import re
import math
import bisect
import heapq
import sys
sys.setrecursionlimit(10000000)
mod = 10 ** 9 + 7
from sys import stdin
readline = stdin.readline

def readInts():
	return list(map(int, readline().split()))

def readTuples():
	return tuple(map(int, readline().split()))

def I():
	return int(readline())
LIST = list()
LIST.append(1)
a = 2
for i in range(32):
	LIST.append(a ** i)
(n, k) = readInts()
if n < k:
	print('NO')
	exit()
ans = []
if n == 1 and k == 1:
	print('YES')
	print(1)
	exit()
if n % 2:
	ans.append(1)
	n -= 1
	k -= 1
least = n
while least != 0 and k >= 0:
	l = bisect.bisect_right(LIST, least)
	v = LIST[l - 1]
	ans.append(v)
	k -= 1
	least = least - v
if k < 0:
	print('NO')
	exit()
ans = list(map(lambda x: x * -1, ans))
heapq.heapify(ans)
for _ in range(k):
	a = heapq.heappop(ans) * -1
	a //= 2
	for i in range(2):
		heapq.heappush(ans, -a)
ans = sorted(list(map(lambda x: x * -1, ans)))
if 0 in ans:
	print('NO')
else:
	print('YES')
	print(*ans)


(n, k) = list(map(int, input().strip().split()))
s = '{0:b}'.format(n)
A = []
if k > n:
	print('NO')
else:
	for (i, bit) in enumerate(reversed(s)):
		if bit == '1':
			A.append(-i)
	import heapq
	heapq.heapify(A)
	if len(A) <= k:
		print('YES')
		diff = k - len(A)
		while diff > 0:
			m = heapq.heappop(A)
			heapq.heappush(A, m + 1)
			heapq.heappush(A, m + 1)
			diff -= 1
		print(' '.join(map(lambda x: str(2 ** (-x)), reversed(sorted(A)))))
	else:
		print('NO')


(n, k) = map(int, input().split())
mults = [1] * k
summy = k
for i in range(k):
	while summy + mults[i] <= n:
		summy += mults[i]
		mults[i] *= 2
if summy != n:
	print('NO')
else:
	print('YES')
	for item in mults:
		print(item, end=' ')


import math
from collections import deque

def main():
	(n, k) = [int(x) for x in input().strip().split(' ')]
	(is_possible, power_list) = solve(n, k)
	if not is_possible:
		print('NO')
	else:
		print('YES')
		print(' '.join((str(x) for x in power_list)))

def solve(n, k):
	factors = factorize(n)
	is_possible = len(factors) <= k and sum(factors) >= k
	if not is_possible:
		return (False, [])
	num_splits_needed = k - len(factors)
	while num_splits_needed > 0:
		f = factors.popleft()
		if f == 1:
			factors.append(f)
			continue
		factors.appendleft(f // 2)
		factors.appendleft(f // 2)
		num_splits_needed -= 1
	return (True, factors)

def factorize(n):
	fs = deque()
	maybe_factor = 2 ** int(math.floor(math.log2(n)))
	while n > 0:
		if n - maybe_factor >= 0:
			fs.append(maybe_factor)
			n -= maybe_factor
		maybe_factor //= 2
	return fs
main()


(n, k) = map(int, input().split())
L = []
L2 = []
i = 1
n2 = n
while i <= n:
	L2.append(i)
	i *= 2
while n != 0:
	x = L2[len(L2) - 1]
	while x <= n:
		n -= x
		L.append(x)
	L2 = L2[:len(L2) - 1]
if len(L) > k or n2 < k:
	print('NO')
else:
	Ljedan = []
	L2 = L[:]
	while len(L2) + len(Ljedan) != k:
		x = L2[len(L2) - 1]
		if x % 2 == 0:
			L2.pop()
			L2 = L2 + [x // 2, x // 2]
		else:
			L2.pop()
			Ljedan.append(1)
	L2.sort()
	L2 = Ljedan + L2
	print('YES')
	for i in range(k):
		print(L2[i], end=' ')


(n, k) = map(int, input().split())
arr = [1 for i in range(k)]
s = k
ptr = k - 1
while ptr > -1:
	while s + arr[ptr] <= n:
		s += arr[ptr]
		arr[ptr] *= 2
	ptr -= 1
if s != n:
	print('NO')
else:
	print('YES')
	print(*arr)


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
l = []
i = 0
while 2 ** i <= 10 ** 9:
	l.append(2 ** i)
	i += 1
(n, k) = I()
res = []
temp = n
for i in reversed(l):
	while k > 0 and n - i >= k - 1:
		res.append(i)
		n -= i
		k -= 1
if sum(res) != temp:
	print('NO')
else:
	print('YES')
	print(*res)


def max_2_pow(n):
	k = 0
	while n > 0:
		n = n // 2
		k += 1
	return 2 ** (k - 1)
(n, k) = [int(x) for x in input().split(' ')]
l = []
if k <= n:
	if n % 2 != 0:
		l.append(1)
		k -= 1
		n -= 1
	while n > 0 and k > 0:
		p = max_2_pow(n)
		l.append(p)
		n -= p
		k -= 1
	if k == 0 and n > 0:
		print('NO')
	else:
		i = 0
		while k > 0:
			if l[i] != 1:
				h = l[i] // 2
				l[i] = h
				l.append(h)
				k -= 1
			else:
				i += 1
		print('YES')
		print(' '.join([str(x) for x in l]))
else:
	print('NO')


import math

def modi(a, m):
	return pow(a, m - 2, m)
(n, k) = [int(x) for x in input().split()]
s = bin(n)[2:]
c = s.count('1')
if c > k:
	print('NO')
else:
	val = 1
	arr = []
	for i in range(len(s)):
		if s[len(s) - i - 1] == '1':
			arr.append(val)
		val *= 2
	d = {}
	for i in arr:
		d[i] = 1
	val = len(d)
	ans = True
	while val < k:
		temp = max(d.keys())
		if temp == 1:
			ans = False
			break
		d[temp] -= 1
		if d[temp] == 0:
			del d[temp]
		if temp // 2 not in d:
			d[temp // 2] = 0
		d[temp // 2] += 2
		val += 1
	if ans:
		print('YES')
		arr = []
		for i in d:
			for j in range(d[i]):
				arr.append(i)
		print(*arr)
	else:
		print('NO')


(n, k) = map(int, input().split())
l = []
while n >= 1:
	l.append(n % 2)
	n = n // 2
p = []
for i in range(len(l)):
	if l[i] != 0:
		p.append(2 ** i * l[i])
c = 0
pl = len(p)
if pl > k:
	c = -1
else:
	y = 1
	cn = 0
	k = k - pl
	fg = 0
	while k > 0:
		if y > pl:
			c = -1
			break
		if p[-1] <= k:
			cn = cn + p[-1]
			k = k - p[-1] + 1
			p.pop(-1)
			y += 1
		else:
			a = -1
			k = k + 1
			t = k
			while k >= 1:
				a += 1
				k = k // 2
			a = 2 ** a
			h1 = 2 * a - t
			g1 = p[-1] // a
			h2 = 2 * (t - a)
			g2 = g1 // 2
			p.pop(-1)
			fg = 1
			break
if c == -1:
	print('NO')
else:
	print('YES', end='\n')
	if fg == 1:
		for i in range(h1):
			p.append(g1)
		for i in range(h2):
			p.append(g2)
	p.sort()
	for i in range(cn):
		print(1, end=' ')
	for i in range(len(p)):
		print(p[i], end=' ')
	print()


(n, k) = map(int, input().split())
twolist = [1]
indexStart = 0
for i in range(1, 30):
	twolist.append(twolist[-1] * 2)
	if twolist[-1] <= n:
		indexStart = i
remainSum = n
ans = []
while remainSum > 0:
	if twolist[indexStart] <= remainSum:
		ans.append(twolist[indexStart])
		remainSum -= twolist[indexStart]
	else:
		indexStart -= 1
if len(ans) > k or k > n:
	print('NO')
else:
	rmk = len(ans)
	ir = 0
	while ir < rmk and rmk < k:
		if ans[ir] == 1:
			ir += 1
			continue
		hf = int(ans[ir] / 2)
		ans[ir] = hf
		ans.append(hf)
		rmk += 1
	print('YES')
	print(' '.join(map(str, ans)))


(n, k) = map(int, input().split())
now = 2 ** 30
nn = 30
ans = []
while now > n:
	nn -= 1
	now //= 2
ans.append(now)
n -= now
k -= 1
if k == 0 and n == 0:
	print('YES')
	print(ans[0])
else:
	while n != 0:
		while now > n:
			nn -= 1
			now //= 2
		n -= now
		ans.append(now)
		k -= 1
	if k < 0:
		print('NO')
	else:
		ans.sort()
		nini = len(ans) - 1
		dopi_ans = []
		while k != 0:
			while ans[nini] <= 1:
				dopi_ans.append(ans.pop(nini))
				nini -= 1
				if nini < 0:
					break
			if nini < 0:
				break
			alfa = ans.pop(nini)
			ans.append(alfa // 2)
			ans.append(alfa // 2)
			k -= 1
			nini = len(ans) - 1
		if nini < 0:
			print('NO')
		else:
			print('YES')
			print(' '.join(map(str, ans + dopi_ans)))


def FindAllElements(n, k):
	sum = k
	A = [1 for i in range(k)]
	i = k - 1
	while i >= 0:
		while sum + A[i] <= n:
			sum += A[i]
			A[i] *= 2
		i -= 1
	for i in range(0, k, 1):
		print(A[i], end=' ')
(n, k) = [int(x) for x in input().split()]
temp = n
ans = 1
curr = 0
c = 0
while n > 0:
	bit = n & 1
	if bit:
		c += 1
		ans *= 2 ** curr
	n = n >> 1
	curr += 1
if ans >= k and c <= k and (temp >= k):
	print('YES')
	FindAllElements(temp, k)
	print()
else:
	print('NO')


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
(a, b) = zz()
l = [int(1) for _ in range(b)]
sum = b
for i in range(b):
	while sum + l[i] <= a:
		sum += l[i]
		l[i] *= 2
if sum == a:
	print('YES')
	print(*l)
else:
	print('NO')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scanner = lambda : int(input())
string = lambda : input().rstrip()
get_list = lambda : list(read())
read = lambda : map(int, input().split())
get_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
alphs = 'abcdefghijklmnopqrstuvwxyz'
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect

def solve():
	(n, k) = read()
	ans = [1] * k
	s = k
	for i in range(k):
		while s + ans[i] <= n:
			s += ans[i]
			ans[i] *= 2
	if s != n:
		print('NO')
	else:
		print('YES')
		print(*ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(1):
	solve()


import heapq
(n, k) = map(int, input().split())

def popcount(n):
	c = 0
	for i in range(32):
		if n & 1 << i:
			c += 1
			b.append(-i)
	return c
b = []
summand = popcount(n)
ans = []
if summand > k or k > n:
	print('NO')
else:
	b.reverse()
	while len(b) < k:
		a = heapq.heappop(b)
		heapq.heappush(b, a + 1)
		heapq.heappush(b, a + 1)
	for i in b:
		ans.append(1 << -i)
	print('YES')
	print(*ans)


(x, y) = map(int, input().split())
a = 0
b = 0
ind = 0
s = []
while x > 0:
	if x % 2 == 1:
		a += 1
		b += 1 << ind
		s.append(1 << ind)
	x >>= 1
	ind += 1
if y < a or y > b:
	print('NO')
	exit(0)
if x == y:
	print('YES')
	for n in range(x):
		print(1, end=' ')
		exit(0)
s.reverse()
n = 0
res = []
while s[n] < y:
	y -= s[n]
	res += [1] * s[n]
	n += 1
res += s[n + 1:]
y -= len(s) - (n + 1)
cnt = [0, s[n]]
k = 1
dgt = 1
while dgt < y:
	cnt.append(cnt[k] // 2)
	cnt.append(cnt[k] // 2)
	k += 1
	dgt += 1
	if dgt == y:
		break
	cnt.append(cnt[k] // 2)
	cnt.append(cnt[k] // 2)
	k += 1
	dgt += 1
cnt.reverse()
for n in range(y):
	res.append(cnt[n])
print('YES')
print(*res)


import math
(a, b) = list(map(int, input().split(' ')))
arr = []
k = 0
while len(arr) + 1 <= b:
	arr.append(pow(2, int(math.log2(a))))
	a -= arr[len(arr) - 1]
	if a == 0:
		break
tam = len(arr)
if a == 0:
	if tam == b:
		print('YES')
		print(*arr)
	elif tam < b:
		while 1:
			e = []
			i = 0
			h = 0
			tam2 = 0
			for i in range(1, tam + 1):
				if arr[i - 1] != 1:
					e.append(int(arr[i - 1] / 2))
					e.append(int(arr[i - 1] / 2))
					tam2 += 2
				else:
					e.append(arr[i - 1])
					tam2 += 1
				if tam - i + tam2 == b:
					arr = e + arr[i:]
					print('YES')
					arr.sort()
					print(*arr)
					h = 1
					break
			tam = tam2
			if h == 1:
				break
			arr = e + arr[i:]
			if list(set(arr)) == [1]:
				print('NO')
				break
else:
	print('NO')


(n, k) = map(int, input().split(' '))
answer = [1 for i in range(0, k)]
total_sum = k
for i in range(0, k):
	while total_sum + answer[i] <= n:
		total_sum = total_sum + answer[i]
		answer[i] = answer[i] * 2
if total_sum != n:
	print('NO')
else:
	print('YES')
	for n in answer:
		print(n, end=' ')
	print()


(a, b) = map(int, input().split())
c = 0
s = str(bin(a))[2:][::-1]
lol = []
for i in range(len(s)):
	if s[i] == '1':
		lol.append(pow(2, i))
		c += 1
if b > a or b < c:
	print('NO')
else:
	k = b - c
	while len(lol) < b:
		yo = []
		for i in range(len(lol)):
			if lol[i] > 1:
				yo.append(lol[i] // 2)
				yo.append(lol[i] // 2)
				k -= 1
			else:
				yo.append(lol[i])
			if k == 0:
				for j in range(i + 1, len(lol)):
					yo.append(lol[j])
				break
		lol = yo[:]
	print('YES')
	print(*lol)


(n, k) = input().split()
n = int(n)
k = int(k)
binary_array = [0] * 31

def get_min(binary, binary_array):
	minimum = 0
	for digit_idx in range(len(binary)):
		if binary[digit_idx] == '1':
			minimum += 1
			binary_array[len(binary) - digit_idx - 1] += 1
	return minimum

def reduce_element(binary_array, count, k):
	idx = len(binary_array) - 1
	while idx > 0:
		if count == k:
			break
		if binary_array[idx] > 0:
			binary_array[idx] -= 1
			binary_array[idx - 1] += 2
			count += 1
		else:
			idx -= 1

def convert(binary_array):
	answer = []
	for (idx, i) in enumerate(binary_array):
		if i > 0:
			array = [2 ** idx] * i
			if array != []:
				answer.extend(array)
	return answer
binary = format(n, 'b')
minimum = get_min(binary, binary_array)
maximum = n
if k < minimum or k > maximum:
	print('NO')
else:
	print('YES')
	count = minimum
	reduce_element(binary_array, count, k)
	answer = convert(binary_array)
	answer = [str(x) for x in answer]
	answer = ' '.join(answer)
	print(answer)


(n, k) = map(int, input().split())
if n < k:
	print('NO')
	exit()
b = format(n, 'b')
b = list(b)
b.reverse()
c = 0
ans = []
for i in range(len(b)):
	if b[i] == '1':
		c += 1
		ans.append(2 ** i)
from collections import deque
ans = deque(ans)
if len(ans) > k:
	print('NO')
else:
	while len(ans) < k:
		x = ans.pop()
		if x % 2 == 0:
			ans.appendleft(x // 2)
			ans.appendleft(x // 2)
		else:
			ans.appendleft(x)
	ans = list(ans)
	ans.sort()
	print('YES')
	print(*ans)


(n, k) = map(int, input().split())
a = []
p = 0
c = 0
while n > 1:
	if n % 2 == 1:
		a.append(2 ** p)
		c += 1
	p += 1
	n = n // 2
if n % 2 == 1:
	a.append(2 ** p)
	c += 1
flag = True
if c > k:
	flag = False
l = c
ans = []
while c < k and l > 0:
	q = a.pop()
	l -= 1
	if q == 1:
		ans.append(q)
	if q // 2 >= 1:
		a.append(q // 2)
		a.append(q // 2)
		c += 1
		l += 2
if c < k or flag == False:
	print('NO')
else:
	print('YES')
	for i in ans:
		print(i, end=' ')
	a.sort()
	for i in a:
		print(i, end=' ')
	print('')


nk = input().split()
n = int(nk[0])
k = int(nk[1])
n_bin = []
n_cop = n
i = 0
while n_cop > 0:
	if n_cop % int(2 ** (i + 1)) != 0:
		n_bin.append(1)
		n_cop -= int(2 ** i)
	else:
		n_bin.append(0)
	i += 1
if k < sum(n_bin) or k > n:
	print('NO')
else:
	print('YES')
	sum_n_bin = sum(n_bin)
	while sum_n_bin < k:
		n_bin[-1] -= 1
		n_bin[-2] += 2
		sum_n_bin += 1
		if n_bin[-1] == 0:
			n_bin = n_bin[:-1]
	nums = []
	for i in range(len(n_bin)):
		for j in range(n_bin[i]):
			nums.append(int(2 ** i))
	print(' '.join((str(x) for x in nums)))


(n, k) = map(int, input().split())
if k > n:
	print('NO')
else:
	a = bin(n)
	a = a[2:]
	b = [0 for i in range(31)]
	for i in range(len(a)):
		if a[i] == '1':
			b[len(a) - 1 - i] = 1
	if b.count(1) <= k:
		print('YES')
		for i in range(31):
			if sum(b) == k:
				break
			while b[31 - 1 - i] > 0 and sum(b) < k:
				b[31 - 1 - i] -= 1
				b[31 - i - 2] += 2
			i += 1
		c = []
		for i in range(31):
			for j in range(b[i]):
				c.append(2 ** i)
		print(*c)
	else:
		print('NO')


from collections import deque

def main():
	(n, k) = map(int, input().strip().split(' '))
	if k > n:
		print('NO')
		return
	factors = find_factors(n)
	if k < len(factors):
		print('NO')
		return
	if k == len(factors):
		print('YES')
		print(' '.join([str(x[0]) for x in factors]))
		return
	k_factors = deque()
	split_remaining = k - len(factors)
	for factor in factors:
		(val, exp) = factor
		if split_remaining > 0:
			split_factors = deque([(val, exp)])
			while True:
				if split_remaining == 0:
					break
				gsf = split_factors.popleft()
				if gsf[1] == 0:
					split_factors.appendleft(gsf)
					break
				split_factors.append((gsf[0] // 2, gsf[1] - 1))
				split_factors.append((gsf[0] // 2, gsf[1] - 1))
				split_remaining -= 1
			for f in split_factors:
				k_factors.append(f[0])
		else:
			k_factors.append(val)
	print('YES')
	print(' '.join([str(x) for x in k_factors]))

def find_factors(n):
	import math
	factors = deque()
	exp = int(math.log2(n))
	factor = int(2 ** exp)
	while factor > 0:
		if n - factor >= 0:
			factors.append((factor, exp))
			n -= factor
		factor //= 2
		exp -= 1
	return factors
main()


(n, k) = map(int, input().split())
b = len(bin(n)[2:])
b1 = bin(n)[2:]
if k < b1.count('1') or k > n:
	print('NO')
	exit()
cand = []
print('YES')
for i in range(b):
	if b1[i] == '1':
		cand.append(2 ** (b - i - 1))
cand.sort(reverse=True)
diff = k - b1.count('1')
while diff:
	for i in range(len(cand)):
		if cand[i] == 1:
			continue
		else:
			if diff == 0:
				continue
			r = cand[i] // 2
			cand.pop(i)
			cand.append(r)
			cand.append(r)
			diff -= 1
print(*cand)


(n, k) = map(int, input().split())
b = bin(n)[2:]
min1 = b.count('1')
if n < k:
	print('NO')
elif min1 > k:
	print('NO')
else:
	print('YES')
	i = 0
	pows = []
	while i < len(b):
		idx = len(b) - 1 - i
		if b[idx] == '1':
			pows.append(2 ** i)
		i += 1
	while len(pows) != k:
		i = len(pows) - 1
		while pows[i] == 1 or pows[i] == 0:
			i -= 1
		while pows[i] != 1 and len(pows) != k:
			pows.append(pows[i] // 2)
			pows[i] //= 2
	ans = ' '.join(map(str, pows))
	print(ans)


(n, k) = [int(x) for x in input().split()]
b = bin(n)[2:][::-1]
if b.count('1') > k or k > n:
	print('NO')
else:
	nums = []
	ans = ''
	for i in range(len(b)):
		if b[i] == '1':
			nums.append(2 ** i)
	_k = 0
	while _k + len(nums) < k:
		num = nums.pop()
		if num == 1:
			ans += '1 '
			_k += 1
		else:
			num = num // 2
			nums.append(num)
			nums.append(num)
	for n in nums:
		ans += str(n) + ' '
	print('YES')
	print(ans[:len(ans) - 1])


(n, k) = map(int, input().split())
b = format(n, 'b')
a = []
for i in b:
	a.append(int(i))
l = 0
if n >= k and k >= sum(a):
	print('YES')
	while sum(a) != k:
		a[l] -= 1
		a[l + 1] += 2
		if a[l] == 0:
			l += 1
	x = ''
	for i in range(len(a)):
		for j in range(a[i]):
			x += str(2 ** (len(a) - i - 1)) + ' '
	print(x)
else:
	print('NO')


def bincalc(n):
	s = []
	v = 0
	while n:
		r = n % 2
		s.append(r)
		n //= 2
		v += r
	return (s[::-1], v)
(n, k) = list(map(int, input().split()))
(a, v) = bincalc(n)
if v > k or k > n:
	print('NO')
else:
	print('YES')
	c = v
	i = 0
	while c < k:
		if a[i] > 0:
			a[i] -= 1
			a[i + 1] += 2
			c += 1
		else:
			i += 1
	out = []
	a = a[::-1]
	for i in range(len(a)):
		out.extend([2 ** i] * a[i])
	print(*out)


(n, k) = [int(x) for x in input().split()]
if n < k:
	print('NO')
else:
	p = []
	t = n
	i = 1
	j = 0
	while t != 0:
		if t & i != 0:
			p.append(2 ** j)
			t = t & t - 1
		j += 1
		i <<= 1
	if len(p) > k:
		print('NO')
	else:
		print('YES')
		i = 0
		diff = k - len(p)
		while diff != 0:
			if p[i] == 1:
				i += 1
				continue
			p[i] //= 2
			p.append(p[i])
			diff -= 1
		p = map(str, p)
		print(' '.join(p))


def read(type=1):
	if type:
		file = open('input.dat', 'r')
		line = list(map(int, file.readline().split()))
		file.close()
	else:
		line = list(map(int, input().strip().split()))
	return (line[0], line[1])

def solve(n, k):
	sol = []
	m = n
	p = 1
	while p <= n:
		p *= 2
	p //= 2
	a = []
	while n:
		if p <= n:
			n -= p
			a.append(p)
		p //= 2
	a.sort()
	if k < len(a) or k > m:
		return sol
	b = [m]
	for v in a:
		if len(b):
			b.append(b[-1] - v)
		else:
			b.append(m - v)
	tot = 0
	step = 0
	while k:
		if b[step + 1] < k:
			v = a[step]
			vk = k - b[step + 1]
			while v:
				p = 1
				while p <= vk:
					p *= 2
				p //= 2
				bit = v // 2 // p
				if vk == p:
					if bit:
						bit *= 2
					else:
						bit = 1
				for i in range(p):
					sol.append(bit)
					v -= bit
					k -= 1
					vk -= 1
			step += 1
		else:
			sol.append(a[step])
			step += 1
			k -= 1
	sol.sort()
	return sol

def write(sol):
	line = ''
	for v in sol:
		line += str(v) + ' '
	print(line)
(n, k) = read(0)
sol = solve(n, k)
if len(sol):
	print('YES')
	write(sol)
else:
	print('NO')


def bits(n):
	arr = []
	i = 0
	while n > 0:
		a = n & 1
		if a == 1:
			arr.append(2 ** i)
		i += 1
		n = n >> 1
	return arr

def check(n, k):
	if k > n:
		print('NO')
		return
	arr = bits(n)
	i = 0
	while i <= len(arr):
		if len(arr) == k:
			print('YES')
			for i in arr:
				print(i, end=' ')
			break
		elif len(arr) > k:
			print('NO')
			break
		if arr[i] == 1:
			i += 1
		else:
			x = arr[i]
			arr[i] = arr[i] // 2
			x = x // 2
			arr.append(x)
(n, k) = [int(x) for x in input().split()]
check(n, k)


def main():
	(n, k) = map(int, input().split())
	n = bin(n)[2:]
	n = [int(x) for x in n]
	vetor = []
	soma = 0
	for d in n:
		vetor.append(d)
		soma += d
	p = 0
	while p < len(n) - 1 and soma < k:
		if vetor[p] > 0:
			vetor[p] -= 1
			vetor[p + 1] += 2
			soma += 1
		else:
			p += 1
	if soma == k:
		print('YES')
		vetor.reverse()
		for i in range(len(vetor)):
			for j in range(vetor[i]):
				print(2 ** i, end=' ')
		print()
	else:
		print('NO')
main()


(N, K) = [int(x) for x in input().split()]
binary = list(bin(N))
binary = binary[2:]
binary.reverse()
checker = []
for i in range(len(binary)):
	if binary[i] == '1':
		checker.append(2 ** i)
if binary.count('1') > K or N < K:
	print('NO')
	exit()
else:
	x = 0
	counter = len(checker)
	if counter == K:
		print('YES')
		print(*checker)
		exit()
	while True:
		while checker[x] % 2 == 0:
			checker[x] = checker[x] // 2
			checker.append(checker[x])
			counter += 1
			if counter == K:
				print('YES')
				print(*checker)
				exit()
		x += 1


(n, k) = map(int, input().rstrip().split())
oldn = n
klist = [1] * k
n -= k
i = 0
while n > 0 and i < k:
	while n >= klist[i]:
		n -= klist[i]
		klist[i] = 2 * klist[i]
	i += 1
if sum(klist) == oldn:
	print('YES')
	print(*klist)
else:
	print('NO')


import heapq

def bitcnt(X):
	res = 0
	v = X
	while v:
		res += v & 1
		v >>= 1
	return res

def bits(X):
	res = []
	order = 0
	v = X
	while v:
		if v & 1:
			res.append(1 << order)
		order += 1
		v >>= 1
	return res

def main():
	(n, k) = map(int, input().split())
	cnt = bitcnt(n)
	if cnt <= k:
		if n < k:
			print('NO')
			return
		print('YES')
		ansque = [-v for v in bits(n)]
		heapq.heapify(ansque)
		for j in range(k - cnt):
			x = heapq.heappop(ansque)
			heapq.heappush(ansque, x // 2)
			heapq.heappush(ansque, x // 2)
		ansque = list(ansque)
		ans = [-v for v in ansque]
		print(*ans)
		return
	else:
		print('NO')
		return
main()


(n, k) = map(int, input().split())
b = list(bin(n)[2:])
b.reverse()
r = []
sm = 0
for i in range(len(b)):
	if b[i] == '1':
		sm += 2 ** int(i)
		r.append(int(i))
if len(r) > k or k > sm:
	print('NO')
elif len(r) == k:
	print('YES')
	for i in r:
		print(2 ** i, end=' ')
else:
	print('YES')
	s = len(r)
	while s != k:
		if r[0] == 0:
			print(2 ** r[0], end=' ')
			r.pop(0)
		else:
			r.insert(0, r[0] - 1)
			r[1] = r[0]
			s += 1
	for i in r:
		print(2 ** i, end=' ')


(a, b) = map(int, input().split())
n = [1] * b
a -= b
i = 0
while a != 0 and i < b:
	while n[i] <= a:
		a -= n[i]
		n[i] <<= 1
	i += 1
if a:
	print('NO')
else:
	print('YES')
	print(*n)


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
from collections import deque

def powers_of_two(n):
	b = bin(n)[2:]
	dq = deque()
	for (i, c) in enumerate(reversed(b)):
		if c == '1':
			dq.append(2 ** i)
	return dq

def solve(n, k):
	if k > n:
		return []
	elif k == n:
		return [1] * n
	dq = powers_of_two(n)
	length = len(dq)
	while length < k:
		cur = dq.pop()
		a = cur // 2
		if a == 1:
			dq.appendleft(1)
			dq.appendleft(1)
		else:
			dq.append(a)
			dq.append(a)
		length += 1
	return dq if length == k else []
res = solve(n, k)
if not res:
	print('NO')
else:
	print('YES')
	print(*res)


def dec_to_bin(n):
	bin = []
	while n != 0:
		bin.append(n % 2)
		n = n // 2
	return bin
(n, k) = map(int, input().split())
bin = dec_to_bin(n)
su = sum(bin)
if su > k or k > n:
	print('NO')
else:
	pos = len(bin) - 1
	while True:
		if su - bin[pos] + 2 * bin[pos] < k:
			bin[pos - 1] += bin[pos] * 2
			su += bin[pos]
			bin[pos] = 0
			pos -= 1
		else:
			d = k - su
			bin[pos] -= d
			bin[pos - 1] += 2 * d
			break
	print('YES')
	for i in range(pos + 1):
		for j in range(bin[i]):
			print(2 ** i, end=' ')


(n, k) = map(int, input().split())
if k > n:
	print('NO')
else:
	a = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912]
	count = 0
	lis = []
	a = list(bin(n))
	b = a[2:]
	my = []
	le = len(b)
	for i in range(le):
		temp = int(b[i]) * 2 ** (le - i - 1)
		if temp != 0:
			my.append(temp)
			count += 1
	if k < count:
		print('NO')
	elif k == count:
		print('YES')
		for i in range(count):
			print(my[i], end=' ')
	else:
		p = 0
		while 1:
			if my[p] != 1 and p < count:
				my[p] = my[p] // 2
				my.append(my[p])
				count += 1
				if count == k:
					break
			elif my[p] == 1 and p < count - 1:
				p += 1
			else:
				break
		if count == k:
			print('YES')
			for i in range(count):
				print(my[i], end=' ')
		else:
			print('NO')


def mi():
	return map(int, input().split(' '))
(n, k) = mi()
s = bin(n)[2:]
ub = 0
for i in s:
	if int(i) == 1:
		ub += 1
powers = []
i = 1
while i < 10000000000.0 + 7:
	powers.append(i)
	i *= 2
ans = [1] * k
if n < k or k < ub:
	print('NO')
else:
	print('YES')
	if sum(ans) == n:
		print(*ans)
	else:
		tsum = sum(ans)
		i = 0
		j = 1
		while tsum != n:
			ans[i] = powers[j]
			tsum += powers[j] - powers[j - 1]
			if tsum == n:
				break
			elif tsum > n:
				ans[i] = powers[j - 1]
				tsum -= powers[j] - powers[j - 1]
				j = 0
				i += 1
			j += 1
		print(*ans)


from collections import deque
(n, k) = map(int, input().split())
binary = bin(n)
powers = deque([2 ** i for (i, bit) in enumerate(reversed(binary)) if bit == '1'])
if len(powers) > k or k > n:
	print('NO')
	exit(0)
print('YES')
ones = 0
while len(powers) + ones != k:
	x = powers.pop()
	if x == 1:
		ones += 1
	elif x // 2 == 1:
		ones += 2
	else:
		powers.append(x // 2)
		powers.append(x // 2)
powers.extend([1] * ones)
print(*powers)


(n, k) = list(map(int, input().split()))
bin_array = list(map(int, bin(n)[:1:-1]))
while len(bin_array) > 1 and sum(bin_array) < k:
	bin_array[-2] += 2
	bin_array[-1] -= 1
	if bin_array[-1] == 0:
		bin_array.pop()
if sum(bin_array) != k:
	print('NO')
	exit()
print('YES')
print(' '.join((str(2 ** i) for (i, x) in enumerate(bin_array) for j in range(x))))


(n, k) = map(int, input().split())
l1 = []
s = bin(n)
for i in range(len(s)):
	if s[i] == '1':
		l1.append(2 ** (len(s) - 1 - i))
if k < len(l1) or k > n:
	print('NO')
else:
	i = 0
	while len(l1) != k:
		if i >= len(l1):
			i = 0
		if l1[i] != 1:
			l1[i] = int(l1[i] / 2)
			l1.append(int(l1[i]))
		i += 1
	print('YES')
	for i in l1:
		print(i, end='  ')


(n, k) = [int(x) for x in input().split()]
ans = []
power = []
for i in range(0, 34):
	power.append(2 ** i)
flag = 0
temp = 0
m = n
prev = temp
while True:
	temp = 0
	k -= 1
	for i in power:
		temp = i
		if m - temp < k:
			temp = prev
			break
		prev = temp
	m -= temp
	ans.append(temp)
	if temp == 0:
		flag = 1
	if m == 0 or k == 0:
		break
if flag == 1 or m != 0:
	print('NO')
else:
	print('YES')
	for i in ans:
		print(i, end=' ')
	print()


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
N = 5 * 10 ** 5 + 7
(n, k) = R()
v = n
d = {}
i = 1
cnt = 0
while n != 0:
	p = n % 2
	cnt += p
	d[i] = p
	n //= 2
	i *= 2
if cnt <= k <= v:
	for i in sorted(d, reverse=True):
		while d[i] and cnt < k:
			cnt += 1
			d[i] -= 1
			d[i // 2] += 2
	print('YES')
	for i in d:
		if d[i]:
			print(*[i] * d[i], end=' ')
else:
	print('NO')


(n, k) = map(int, input().split())
a = [1] * k
if n == k:
	print('YES')
	print(*a)
else:
	sum = k
	i = k - 1
	while i >= 0:
		while sum + a[i] <= n:
			sum += a[i]
			a[i] *= 2
		i -= 1
		if sum >= n:
			break
	if sum != n:
		print('NO')
		exit()
	else:
		print('YES')
		print(*a)


(n, k) = map(int, input().split())
if k > n or k < bin(n)[2:].count('1'):
	print('NO')
else:
	print('YES')
	a = bin(n)[2:][::-1]
	ind = 0
	powers = []
	for char in a:
		if char == '1':
			powers.append(2 ** ind)
		ind += 1
	ind = 0
	tot = len(powers)
	while tot < k:
		if powers[ind] > 1:
			powers[ind] //= 2
			powers.append(powers[ind])
			tot += 1
		else:
			ind += 1
	out = ''
	for guy in powers:
		out += str(guy) + ' '
	print(out)


(n, k) = map(int, input().split())
s = bin(n)[2:]
st = []
if s.count('1') > k or k > n:
	print('NO')
else:
	st = []
	for i in range(len(s)):
		if int(s[i]):
			st.append(int(s[i]) * 2 ** (len(s) - 1 - i))
	ans = k - len(st)
	st1 = []
	while ans:
		if st[-1] == 1:
			st1.append(st.pop())
		else:
			temp = st.pop()
			st.append(temp // 2)
			st.append(temp // 2)
			ans -= 1
	while st:
		st1.append(st.pop())
	print('YES')
	print(*st1)


(n, k) = input().split(' ')
n = int(n)
k = int(k)
s = format(n, 'b')
s = list(s)
s = map(int, s)
s = list(s)
s = s[::-1]
m = sum(s)
if k == m:
	print('YES')
	i = 0
	while i < len(s):
		if s[i]:
			print(2 ** i, end=' ')
		i += 1
	print()
elif k == n:
	print('YES')
	print('1 ' * k)
	print()
elif k > m and k < n:
	delta = k - m
	i = len(s) - 1
	while delta > 0:
		if s[i] > 0:
			s[i] -= 1
			s[i - 1] += 2
			delta -= 1
		elif s[i] == 0:
			i -= 1
	print('YES')
	i = 0
	b = 1
	while i < len(s):
		if s[i] > 0:
			print(b, end=' ')
			s[i] -= 1
			delta -= 1
		if s[i] == 0:
			i += 1
			b *= 2
	print()
else:
	print('NO')


(ni, k) = map(int, input().split(' '))
n = ni
a = 0
cont = 0
vetor = [0] * 35
while n:
	vetor[cont] = n % 2
	if vetor[cont]:
		a += 1
	n //= 2
	cont += 1
if ni < k or k < a:
	print('NO')
	exit()
else:
	while cont > 0 and a < k:
		while vetor[cont] and a < k:
			vetor[cont] -= 1
			vetor[cont - 1] += 2
			a += 1
		cont -= 1
	if a > k:
		print('NO')
		exit()
	else:
		print('YES')
		b = 1
		for i in range(32):
			while vetor[i]:
				print(b, end=' ')
				vetor[i] -= 1
			b = b * 2


def countSetBits(n):
	count = 0
	while n:
		count += n & 1
		n >>= 1
	return count
(n, k) = list(map(int, input().split()))
jj = countSetBits(n)
bi = bin(n)[2:]
a = []
l = len(bi)
for (i, j) in enumerate(bi):
	if j == '1':
		a.append(2 ** (l - 1 - i))
kk = 0
if k < jj or k > n:
	print('NO')
else:
	print('YES')
	while k != len(a):
		while a[kk] == 1:
			kk += 1
		a[kk] = int(a[kk]) // 2
		a.append(a[kk])
	print(' '.join(list(map(str, a))))


import math

def highestPowerof2(n):
	p = int(math.log(n, 2))
	return (p, int(pow(2, p)))

def check(n, e, k):
	while 1:
		n1 = int(pow(2, e - 1))
		rem = n - n1
		if rem >= k - 1:
			return n1
		else:
			e -= 1
(n, k) = [int(x) for x in input().split()]
if k > n:
	print('NO')
elif k == n:
	ans = [1] * k
	print('YES')
	print(*ans)
elif k == 1:
	if highestPowerof2(n)[1] == n:
		print('YES')
		print(n)
	else:
		print('NO')
else:
	ans = []
	N = n
	while k > 0:
		(exp, next) = highestPowerof2(n)
		if n - next >= k - 1:
			rem = n - next
			ans.append(next)
			if rem == k - 1:
				ans += [1] * rem
				break
			k -= 1
		else:
			next = check(n, exp, k)
			ans.append(next)
			k -= 1
			rem = n - next
		n = rem
	if sum(ans) == N:
		print('YES')
		print(*sorted(ans))
	else:
		print('NO')


def main():
	(n, k) = [int(i) for i in input().split()]
	if n < k:
		print('NO')
		return
	res = [1] * k
	if n == k:
		print('YES')
		print(*res)
		return
	n -= k
	i = 0
	while i < k and n:
		while res[i] <= n:
			n -= res[i]
			res[i] *= 2
		i += 1
	if n:
		print('NO')
	else:
		print('YES', *res)
main()


(n, k) = map(int, input().split())
x = bin(n).count('1')
y = list(map(int, bin(n)[2:]))
if x <= k <= n:
	print('YES')
	for i in range(k - x):
		for j in range(len(y)):
			if y[j] > 0:
				y[j + 1] += 2
				y[j] -= 1
				break
	y = y[::-1]
	for i in range(len(y)):
		for j in range(y[i]):
			print(2 ** i, end=' ')
else:
	print('NO')


(n, k) = list(map(int, input().split()))
potenciasde2 = []
pot2 = 1
while pot2 <= n:
	if pot2 & n:
		potenciasde2.append(pot2)
	pot2 *= 2
if len(potenciasde2) > k or k > n:
	print('NO')
else:
	print('YES')
	while k != len(potenciasde2):
		i = potenciasde2.index(max(potenciasde2))
		maximo = max(potenciasde2)
		m = 1
		while len(potenciasde2) - 1 + potenciasde2[i] // m > k:
			m *= 2
		del potenciasde2[i]
		potenciasde2 += [m] * (maximo // m)
	print(*potenciasde2)


from math import *
(n, k) = map(int, input().split())
binary = bin(n)[2:]
t = binary.count('1')
if t > k or k > n:
	print('NO')
else:
	print('YES')
	n += 1
	while k:
		curr = 2 ** floor(log2(n - k))
		print(curr, end=' ')
		n -= curr
		k -= 1


from heapq import heappop, heappush, heapify
heap = []
heapify(heap)
[n, m] = list(map(int, input().split()))
s = bin(n)
s = s[2:]
cnt = 0
for i in range(len(s)):
	if s[i] == '1':
		cnt += 1
		heappush(heap, -1 * 2 ** (len(s) - i - 1))
if n == m:
	print('YES')
	print(*[1] * m)
elif cnt > m:
	print('NO')
elif len(heap) == m:
	print('YES')
	for i in heap:
		print(-1 * i, end=' ')
else:
	z = len(heap)
	flag = 0
	while z != m:
		x = heap[0]
		if x == -1:
			flag = 1
			break
		heappop(heap)
		heappush(heap, 1 * int(x / 2))
		heappush(heap, 1 * int(x / 2))
		z = len(heap)
		if z > m:
			break
	if flag:
		print('NO')
	else:
		print('YES')
		for i in heap:
			print(-1 * i, end=' ')


ina = input().split()
n = int(ina[0])
k = int(ina[1])
n1 = n
ans = 0
c = []
s = 1
while n > 0:
	if n & 1:
		ans += 1
		c.append(s)
	s *= 2
	n = n >> 1
if ans <= k and k <= n1:
	print('YES')
	t = 0
	while len(c) < k:
		if c[t] > 1:
			c.append(c[t] // 2)
			c[t] = c[t] // 2
		else:
			t += 1
	for i in c:
		print(i, end=' ')
else:
	print('NO')


import os
import sys
from io import BytesIO, IOBase
import math
from itertools import permutations
from decimal import Decimal, getcontext
getcontext().prec = 25
MOD = pow(10, 9) + 7
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, k) = map(int, input().split(' '))
a = bin(n)[2:]
c = 0
for i in a:
	if i == '1':
		c += 1
if k < c or k > n:
	print('NO')
elif k == n:
	print('YES')
	print('1 ' * n)
elif k == c:
	x = len(a) - 1
	ans = []
	for i in a:
		if i == '1':
			ans.append(2 ** x)
		x -= 1
	print('YES')
	print(*ans)
else:
	x = len(a) - 1
	ans = []
	for i in a:
		if i == '1':
			ans.append(2 ** x)
		x -= 1
	m = len(ans)
	i = 0
	while m != k:
		if ans[i] > 1:
			ans.append(ans[i] // 2)
			ans[i] //= 2
			m += 1
		else:
			i += 1
	print('YES')
	print(*ans)


import heapq

def block(x):
	v = []
	d = []
	while x > 0:
		v.append(int(x % 2))
		x = int(x / 2)
	for i in range(0, len(v)):
		if v[i] == 1:
			d.append(2 ** i)
	return d
(n, k) = map(int, input().split())
u = block(n)
lu = len(u)
for i in range(lu):
	u[i] = -u[i]
heapq.heapify(u)
if len(u) > k:
	print('NO')
else:
	while True:
		if lu == k:
			print('YES')
			for i in range(len(u)):
				print(-u[i], end=' ')
			print()
			break
		else:
			h = heapq.heappop(u)
			if h != -1:
				heapq.heappush(u, h // 2)
				heapq.heappush(u, h // 2)
				lu += 1
			else:
				print('NO')
				break


def output_successful_answer(count):
	print('YES')
	power = 1
	for i in range(len(count) - 1, -1, -1):
		while count[i] > 0:
			print(power, end=' ')
			count[i] -= 1
		power *= 2
	print()

def get_ans(count, total_powers, k, i):
	while total_powers < k and i + 1 < len(count):
		if count[i] >= 1:
			count[i + 1] += 2
			count[i] -= 1
			total_powers += 1
			while total_powers < k and count[i] >= 1:
				count[i + 1] += 2
				count[i] -= 1
				total_powers += 1
		i += 1
	return total_powers
(n, k) = map(int, input().split())
count = list(map(int, list(bin(n)[2:])))
total_powers = get_ans(count, sum(count), k, 0)
if total_powers == k:
	output_successful_answer(count)
else:
	print('NO')


(n, k) = map(int, input().split())
a = [1] * k
n -= k
i = 0
while i < k and n > 0:
	while a[i] <= n:
		n -= a[i]
		a[i] *= 2
	i += 1
if n != 0:
	print('NO')
else:
	print('YES')
	for i in range(k):
		print(a[i], end=' ')


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
it = lambda : tuple(map(int, input().split()))
ls = lambda : list(input())
(n, k) = f()
m = n
l = []
x = 1
while x < 10 ** 9:
	l.append(x)
	x = x << 1
res = []
l.reverse()
for i in l:
	while k > 0 and n - i >= k - 1:
		res.append(i)
		n -= i
		k -= 1
if sum(res) != m:
	print('NO')
else:
	print('YES')
	print(*res)


import collections
(n, k) = map(int, input().split())
powers = []
ones = 0
if 1 & n:
	ones += 1
i = 2
while i <= n:
	if i & n:
		powers.append(i)
	i *= 2
if k < len(powers) + ones:
	print('NO')
else:
	while len(powers) > 0 and k > len(powers) + ones:
		element = powers[-1]
		if element == 2:
			ones += 2
			del powers[-1]
		else:
			powers[-1] = powers[-1] // 2
			powers.append(powers[-1])
	ans = ''
	for i in powers:
		ans += str(i) + ' '
	for i in range(ones):
		ans += '1 '
	if k == len(powers) + ones:
		print('YES')
		print(ans)
	else:
		print('NO')


(a, b) = map(int, input().split())
z = [1] * b
a -= b
i = 0
while i < b and a:
	while z[i] <= a:
		a -= z[i]
		z[i] *= 2
	i += 1
if a:
	print('NO')
else:
	print('YES')
	[print(i) for i in z]


entrada = input().split()
n = int(entrada[0])
k = int(entrada[1])
arr_result = []
k_temp = k
n_temp = n
soma = 0
m = 0
i = 30
while i >= 0 and k >= 0:
	m = 1 << i
	if m > n or n - m < k - 1:
		i -= 1
		continue
	soma += m
	arr_result.append(m)
	n -= m
	k -= 1
if len(arr_result) == k_temp and soma == n_temp:
	print('YES')
	for resp in arr_result:
		print(resp, end=' ')
	print('')
else:
	print('NO')


(n, k) = map(int, input().split())
if k > n:
	print('NO')
elif k == n:
	print('YES')
	for i in range(n):
		print('1', end=' ')
	print()
else:
	pows = [0] * 30
	l = i = 0
	nc = n
	while nc > 0:
		pows[i] = nc % 2
		l += pows[i]
		nc //= 2
		i += 1
	if k < l:
		print('NO')
	else:
		for i in range(29, 0, -1):
			if l < k:
				while pows[i] > 0 and l < k:
					pows[i] -= 1
					pows[i - 1] += 2
					l += 1
			else:
				break
		m = 1
		print('YES')
		for i in range(30):
			for j in range(pows[i]):
				print(m, end=' ')
			m *= 2
		print()


from math import log2

def main():
	(n, k) = map(int, input().strip().split())
	nb = bin(n)[2:]
	if nb.count('1') > k:
		print('NO')
		return
	if n < k:
		print('NO')
		return
	n += 1
	ans = []
	while k > 0:
		d = n - k
		b = 1
		while d >= b << 1:
			b = b << 1
		ans.append(b)
		n -= b
		k -= 1
	print('YES')
	for x in ans:
		print(x, end=' ')
	print()
main()


(n, k) = map(int, input().split())
c = 0
s = dict()
ans = []
r = n
f = 0
while n > 0:
	c += 1
	if n % 2 == 1:
		f += 1
		s.update({2 ** (c - 1): 1})
	n //= 2
n = r
if k > n:
	print('NO')
elif k < f:
	print('NO')
else:
	print('YES')
	r = k - f
	while r > 0:
		for j in s:
			if j != 1:
				if j // 2 not in s:
					s.update({j // 2: 2})
				else:
					s[j // 2] += 2
				s[j] -= 1
				if s[j] == 0:
					del s[j]
				r -= 1
				break
	for j in s:
		for k in range(s[j]):
			ans.append(j)
	print(*ans, sep=' ')


import math
(n, k) = map(int, input().split())
n_temp = n
num = [2 ** x for x in range(int(math.log(n, 2) + 1))]
res = []
for i in num[::-1]:
	while k > 0 and n - i >= k - 1:
		res.append(i)
		n -= i
		k -= 1
if sum(res) != n_temp:
	print('NO')
else:
	print('YES')
	print(*res)


(n, k) = list(map(int, input().split()))
ans = []

def myrec(dig):
	a = 1
	if dig == 0:
		return
	while a <= dig:
		a *= 2
	a //= 2
	dig -= a
	ans.append(a)
	myrec(dig)
myrec(n)
ans.sort(reverse=True)
i = 0
while len(ans) < k and i <= len(ans) - 1:
	if ans[i] == 1:
		i += 1
		continue
	ans.append(ans[i] // 2)
	ans[i] = ans[i] // 2
if len(ans) != k:
	print('NO')
else:
	print('YES')
	print(' '.join(map(str, ans)))


(t, k) = input().split()
t = int(t)
k = int(k)
a = []
b = []
l = 0
if k > t:
	print('NO')
else:
	j = 0
	while t > 0:
		if t % 2 == 1:
			a.append(2 ** j)
			l += 1
		t //= 2
		j += 1
	if k < l:
		print('NO')
	else:
		while 1:
			if len(a) == k:
				break
			if a[0] == 1:
				a.remove(1)
				b.append(1)
				k -= 1
			else:
				x = a[0] // 2
				a.remove(a[0])
				a.append(x)
				a.append(x)
		print('YES')
		print(*b, *a)


import sys

def solve(io):
	N = io.read_int()
	K = io.read_int()
	B = [0] * 32
	cnt = 0
	for i in range(0, len(B)):
		if N >> i & 1 != 0:
			B[i] += 1
			cnt += 1
	if K > N or cnt > K:
		io.println('NO')
		return
	p = len(B) - 1
	while cnt < K:
		while B[p] == 0:
			p -= 1
		B[p] -= 1
		B[p - 1] += 2
		cnt += 1
	io.println('YES')
	for (i, x) in enumerate(B):
		for _ in range(0, x):
			io.print(1 << i)
			io.print(' ')
	io.println()

class IO:
	in_stream = None
	out_stream = None
	raw = ''
	buf = []
	pos = 0

	def __init__(self, input_stream, output_stream):
		self.in_stream = input_stream
		self.out_stream = output_stream

	def read_to_buffer(self):
		self.raw = self.in_stream.readline().rstrip('\n')
		self.buf = self.raw.split()
		self.pos = 0

	def read_string(self):
		while self.pos == len(self.buf):
			self.read_to_buffer()
		ans = self.buf[self.pos]
		self.pos += 1
		return ans

	def read_int(self):
		return int(self.read_string())

	def read_float(self):
		return float(self.read_string())

	def read_string_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_string())
		return arr

	def read_int_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_int())
		return arr

	def read_float_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_float())
		return arr

	def read_line(self):
		while self.pos == len(self.buf):
			self.read_to_buffer()
		if self.pos > 0:
			raise ValueError('Cannot call read_line in the middle of a line.')
		self.pos = len(self.buf)
		return self.raw

	def print(self, *args):
		self.out_stream.write(' '.join([str(x) for x in args]))

	def println(self, *args):
		self.print(*args)
		self.print('\n')

	def println_array(self, arr, sep=' '):
		self.println(sep.join((str(x) for x in arr)))

	def flush_output(self):
		self.out_stream.flush()
pythonIO = IO(sys.stdin, sys.stdout)
solve(pythonIO)
pythonIO.flush_output()


(n, m) = map(int, input().split())
x = bin(n)[2:]
ones = x.count('1')
if m < ones or m > n:
	print('NO')
else:
	print('YES')
	x = x[::-1]
	s = [0 for i in range(35)]
	for i in range(len(x)):
		if x[i] == '1':
			s[i] += 1
	status = False
	while ones != m:
		if status == True:
			break
		for i in range(1, 35):
			if s[i] != 0:
				s[i] -= 1
				s[i - 1] += 2
				ones += 1
			if ones == m:
				status = True
				break
	for i in range(0, 35):
		for j in range(0, s[i]):
			print(2 ** i, end=' ')
	print()


from collections import deque
(n, k) = map(int, input().split())
s = bin(n).replace('0b', '')
if s.count('1') > k:
	print('NO')
elif n < k:
	print('NO')
else:
	print('YES')
	ans = []
	s = s[::-1]
	if s[0] == '1':
		ans.append(1)
		k -= 1
	aux = deque()
	for i in range(1, len(s)):
		if s[i] == '1':
			aux.append(2 ** i)
	while len(aux) < k:
		p = aux.pop()
		(a, b) = (p // 2, p // 2)
		if a == 1:
			k -= 2
			ans.extend([1, 1])
		else:
			aux.appendleft(a)
			aux.appendleft(b)
	ans += aux
	ans.sort()
	print(*ans)


from collections import deque
import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
pow2 = [1]
for _ in range(35):
	pow2.append(2 * pow2[-1])
x = []
for i in pow2:
	if i & n:
		x.append(i)
ans = 'YES' if len(x) <= k <= n else 'NO'
print(ans)
if ans == 'YES':
	c = k - len(x)
	q = deque()
	y = []
	while c:
		if not q:
			q.append(x.pop())
		i = q.popleft()
		if i == 1:
			y.append(i)
		else:
			q.append(i // 2)
			q.append(i // 2)
			c -= 1
	for i in y:
		x.append(i)
	for i in q:
		x.append(i)
	print(*x)


from collections import defaultdict
(N, K) = map(int, input().split())
num = 0
M = N
pow2 = [2 ** i for i in range(31)]
rec = defaultdict(int)
for j in range(min(K + 1, M)):
	for i in range(30, -1, -1):
		if M >= pow2[i]:
			M -= pow2[i]
			num += 1
			rec[i] = 1
if num > K:
	print('NO')
elif num == K:
	print('YES')
	print(' '.join(map(lambda i: str(pow2[i]), rec.keys())))
else:
	for i in range(30, 0, -1):
		while rec[i] > 0:
			if num == K:
				break
			rec[i] -= 1
			rec[i - 1] += 2
			num += 1
	if num < K:
		print('NO')
		exit()
	ans = []
	for (i, k) in rec.items():
		for j in range(k):
			ans.append(i)
	print('YES')
	print(' '.join(map(lambda i: str(pow2[i]), ans)))


from math import log2
from heapq import heappush, heappop, heapify

class MinHeap:

	def __init__(self):
		self.heap = []

	def parent(self, i):
		return (i - 1) / 2

	def insertKey(self, k):
		heappush(self.heap, k)

	def decreaseKey(self, i, new_val):
		self.heap[i] = new_val
		while i != 0 and self.heap[self.parent(i)] > self.heap[i]:
			(self.heap[i], self.heap[self.parent(i)]) = (self.heap[self.parent(i)], self.heap[i])

	def extractMin(self):
		return heappop(self.heap)

	def deleteKey(self, i):
		self.decreaseKey(i, float('-inf'))
		self.extractMin()

	def getMin(self):
		return self.heap[0]

	def leng(self):
		return len(self.heap)

	def summ(self):
		return sum(self.heap)
import math
(n, m) = map(int, input().split())

def pr(num, k, sol):
	if k <= 0 and num <= 0:
		if sol.summ() == -n and sol.leng() == m:
			print('YES')
			pp = [-sol.extractMin() for _ in range(m)]
			pp.reverse()
			print(' '.join(map(str, pp)))
		else:
			print('NO')
	elif k > 0 and num <= 0:
		while k > 0:
			tt = sol.extractMin()
			if tt == -1:
				break
			sol.insertKey(tt // 2)
			sol.insertKey(tt // 2)
			k -= 1
		if k > 0:
			print('NO')
		else:
			print('YES')
			pp = [-sol.extractMin() for _ in range(m)]
			pp.reverse()
			print(' '.join(map(str, pp)))
	elif num % 2 != 0:
		sol.insertKey(-1)
		pr(num - 1, k - 1, sol)
	elif math.floor(log2(num)) == log2(num):
		if k == 1:
			sol.insertKey(-num)
			num = -1
			pr(num, k - 1, sol)
		else:
			sol.insertKey(-num // 2)
			pr(num // 2, k - 1, sol)
	else:
		p = 2 ** math.floor(log2(num))
		sol.insertKey(-p)
		pr(num - p, k - 1, sol)
ho = MinHeap()
pr(n, m, ho)


(n, k) = map(int, input().split())
final = [1] * k
kCopy = k
for i in range(k):
	while kCopy + final[i] <= n:
		kCopy += final[i]
		final[i] *= 2
if sum(final) == n:
	print('YES')
	print(*final)
else:
	print('NO')


def solve():
	(n, k) = [int(i) for i in input().split(' ')]
	a = [1] * k
	s = k
	for i in range(k):
		while s + a[i] <= n:
			s += a[i]
			a[i] *= 2
	if s != n:
		return 'NO'
	o = 'YES\n'
	o += ' '.join((str(i) for i in a))
	return o
print(solve())


n = list(map(int, input().split(' ')))
s = ''
r = n[0]
k = n[0]
z = n[1]
a = []
b = 0
while k != 0:
	if k % 2 == 0:
		s += '0'
	else:
		s += '1'
		a += [2 ** b]
	b += 1
	k = k // 2
if len(a) > z or z > r:
	print('NO')
else:
	c = 0
	print('YES')
	while len(a) < z:
		if a[c] != 1:
			a.append(a[c] // 2)
			a[c] = a[c] // 2
		else:
			c += 1
	for i in a:
		print(i)


import gc

def main():
	(n, k) = list(map(int, input().split()))
	if n < k:
		print('NO')
		return
	if n == k:
		print('YES')
		print(' '.join(['1'] * k))
		return
	powers = []
	while n:
		x = 1
		while x * 2 <= n:
			x *= 2
		n -= x
		powers.append(x)
	if len(powers) > k:
		print('NO')
		return
	if len(powers) == k:
		print('YES')
		print(' '.join(list(map(str, powers))))
		return
	pd = {}
	nums = 0
	pm = max(powers)
	for e in powers:
		pd[e] = pd.get(e, 0) + 1
		nums += pd[e]
	while nums < k:
		x = pm
		while x not in pd or pd[x] == 0:
			x //= 2
		pd[x // 2] = pd.get(x // 2, 0) + 2
		pd[x] -= 1
		nums += 1
	result = []
	for k in pd:
		result.extend([k] * pd[k])
	print('YES')
	print(' '.join(list(map(str, result))))
	return
gc.disable()
main()


from collections import Counter

def read_nums():
	return [int(x) for x in input().split()]

def get_powers_of_two(n):
	res = []
	while n > 0:
		i = 1
		while i * 2 <= n:
			i *= 2
		res.append(i)
		n -= i
	return res

def main():
	(n, num_k) = read_nums()
	powers_of_two = Counter(get_powers_of_two(n))
	while sum(powers_of_two.values()) != num_k:
		if sum(powers_of_two.values()) < num_k:
			fixed = False
			for k in powers_of_two:
				if k > 1 and powers_of_two[k] > 0:
					powers_of_two[k] -= 1
					powers_of_two[k // 2] += 2
					fixed = True
					break
			if not fixed:
				print('NO')
				exit(0)
		else:
			fixed = False
			for k in powers_of_two:
				if powers_of_two[k] > 1:
					powers_of_two[k] -= 2
					powers_of_two[k * 2] += 1
					fixed = True
					break
			if not fixed:
				print('NO')
				exit(0)
	print('YES')
	nums = []
	for (k, v) in powers_of_two.items():
		for _ in range(v):
			nums.append(k)
	print(' '.join([str(x) for x in nums]))
main()


(n, k) = map(int, input().split())
jog = k
a = k * [1]
for i in range(k - 1, -1, -1):
	while jog + a[i] <= n:
		jog += a[i]
		a[i] *= 2
if jog == n:
	print('YES')
	print(*a)
else:
	print('NO')


(t, k) = map(int, input().split())
s = str(bin(t))[2:]
if t < k or k < s.count('1'):
	print('NO')
else:
	l = [int(i) for i in s]
	l.reverse()
	for i in range(len(l) - 1, 0, -1):
		if l[i] != 0:
			if sum(l) + l[i] < k:
				l[i - 1] += 2 * l[i]
				l[i] = 0
			else:
				t = k - sum(l)
				l[i - 1] += t * 2
				l[i] -= t
	print('YES')
	for i in range(len(l)):
		print(l[i] * (str(2 ** i) + ' '), end='')


from math import log
L = []

def power_of_2(x):
	return 1 << x.bit_length() - 1

def solve(n, k):
	if n == k:
		for i in range(n):
			L.append(1)
		return True
	if n < k:
		return False
	return helper(n, k - power_of_2(n), k - 1)

def helper(n, x, y):
	p = power_of_2(n)
	d = n - p
	L.append(p)
	if d == 0 and x <= 0 and (y >= 0):
		return True
	elif d == 0:
		return False
	else:
		return helper(d, x - p, y - 1)
(n, k) = map(int, input().split(' '))
if solve(n, k):
	total = len(L)
	ans = []
	for (i, p) in enumerate(L):
		if total + (p - 1) > k:
			chunks = k - total + 1
			p1 = p.bit_length() - 1
			p2 = chunks.bit_length() - 1
			num1 = 2 ** (p1 - p2)
			num2 = 2 ** (p1 - p2 - 1)
			s1 = int(2 * 2 ** p2 - chunks)
			s2 = int(chunks - s1)
			ans += [num1 for _ in range(s1)]
			ans += [num2 for _ in range(s2)]
			ans += L[i + 1:]
			break
		else:
			total += p - 1
			ans += [1 for _ in range(p)]
	print('YES')
	print(' '.join(map(str, ans)))
else:
	print('NO')


(n, k) = input().split()
n = int(n)
k = int(k)
binary = str(bin(n)[2:])
ctr = 0
ans = []
for i in range(len(binary)):
	if binary[i] == '1':
		ctr += 1
		ans.append(2 ** (len(binary) - i - 1))
ans.sort(reverse=True)
if k > n:
	print('NO')
elif ctr == k:
	print('YES')
	ans.sort()
	for i in ans:
		print(i)
elif ctr > k:
	print('NO')
else:
	i = 0
	while len(ans) < k:
		if ans[i] != 1:
			ans[i] = int(ans[i] / 2)
			ans.append(ans[i])
		else:
			i += 1
	if len(ans) == k:
		print('YES')
		ans.sort()
		for i in ans:
			print(i)


(n, k) = map(int, input().split())
s = []
while n:
	s.append(n & -n)
	n &= n - 1
ones = list(filter(lambda x: x == 1, s))
rem = list(filter(lambda x: x > 1, s))

def split():
	if len(rem) == 0:
		print('NO')
		exit(0)
	x = rem.pop()
	if x == 2:
		ones.append(1)
		ones.append(1)
	else:
		rem.append(x >> 1)
		rem.append(x >> 1)
k -= len(ones) + len(rem)
if k < 0:
	print('NO')
	exit(0)
else:
	for _ in range(k):
		split()
	print('YES')
	print(*ones + rem)


(n, k) = [int(_) for _ in input().split()]
b = [int(_) for _ in bin(n)[2:]]
c = b.count(1)
b.reverse()
z = []
for i in range(len(b)):
	if b[i] == 1:
		z.append(2 ** i)
count = 0
ans = ''
if k == c:
	print('YES\n' + ' '.join([str(_) for _ in z]))
elif k < c or k > n:
	print('NO')
else:
	while len(z) + count < k:
		m = z.pop()
		if m == 1:
			count += 1
			ans += ' ' + str(m)
		else:
			z.append(m // 2)
			z.append(m // 2)
	for f in z:
		ans += ' ' + str(f)
	print('YES\n' + ans.strip())


import heapq
(n, k) = map(int, input().split())
s = bin(n)[2:]
minval = s.count('1')
maxval = n
if k >= minval and k <= maxval:
	print('YES')
	L = []
	for (i, x) in enumerate(s[::-1]):
		if x == '1':
			heapq.heappush(L, -2 ** i)
	while len(L) != k:
		current = heapq.heappop(L)
		heapq.heappush(L, current // 2)
		heapq.heappush(L, current // 2)
	print(' '.join([str(-x) for x in L]))
else:
	print('NO')


(n, k) = map(int, input().split())
a = list(map(int, list(str(bin(n)).lstrip('0b'))))
c = a.count(1)
j = 0
while c < k:
	if j > len(a) - 2:
		break
	if a[j]:
		c += 1
		a[j] -= 1
		a[j + 1] += 2
	else:
		j += 1
if c != k:
	print('NO')
else:
	print('YES')
	for i in range(len(a)):
		for k in range(a[i]):
			print(2 ** (len(a) - i - 1), end=' ')


(n, k) = map(int, input().split())
n = bin(n)[2:]
if n.count('1') > k:
	print('NO')
else:
	l = []
	for i in range(len(n)):
		if n[i] == '1':
			l.append(2 ** (len(n) - i - 1))
	l.sort(reverse=True)
	j = 0
	while k - len(l) > 0:
		while j < len(l) and l[j] == 1:
			j = j + 1
		if j >= len(l):
			print('NO')
			exit(0)
		l[j] = l[j] // 2
		l.append(l[j])
	l.sort()
	print('YES')
	for i in l:
		print(i, end=' ')


from bisect import bisect_right

def main():
	res = []
	(n, k) = [int(i) for i in input().split()]
	if n < k:
		return []
	mult = 1
	mults = []
	while mult < 1000000001:
		mults.append(mult)
		mult *= 2
	while n > 0 and k > 0:
		i = bisect_right(mults, n) - 1
		tmp_n = n - mults[i]
		k -= 1
		if tmp_n > 0 and k == 0:
			return []
		while tmp_n < k and i >= 0:
			i -= 1
			tmp_n = n - mults[i]
		n = tmp_n
		res.append(mults[i])
	return res
res = main()
if len(res) == 0:
	print('NO')
else:
	print('YES')
	print(*res)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 1000000007

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]

def get(n):
	k = int(log2(n))
	return k
(n, k) = value()
powers = [1] * k
have = n - k + 1
for i in range(k):
	if have <= 1:
		break
	p = get(have)
	powers[i] = 2 ** p
	have -= 2 ** p - 1
if have == 1:
	print('YES')
	print(*powers)
else:
	print('NO')


(n, k) = [int(i) for i in input().split()]
s = bin(n)
stack = []
j = 0
for i in reversed(s):
	if i == '1':
		stack.append(2 ** j)
	j += 1
if len(stack) > k or n < k:
	print('NO')
	exit(0)
ones = 0
while len(stack) != k - ones:
	while True:
		tmp = stack.pop()
		if tmp != 1:
			break
		else:
			ones += 1
	stack.append(tmp // 2)
	stack.append(tmp // 2)
print('YES')
print(*[1 for i in range(ones)], end=' ')
print(*stack)


try:
	(n, k) = map(int, input().split())
except:
	exit()
if n < k:
	print('NO')
	exit(0)
q = []
s = {}
i = 1
while n:
	if n & 1 != 0:
		if i > 1:
			q.append(i)
		if i not in s.keys():
			s[i] = 0
		s[i] += 1
	i = i << 1
	n = n >> 1
if len(s) > k:
	print('NO')
	exit(0)
i = len(s)
while i < k and q:
	top = q.pop(0)
	s[top] -= 1
	if top // 2 not in s.keys():
		s[top // 2] = 0
	s[top // 2] += 2
	if top // 2 > 1:
		q.append(top // 2)
		q.append(top // 2)
	i += 1
if i < k:
	print('NO')
	exit(0)
print('YES', *[k for k in s.keys() for i in range(s[k])])


import sys
(n, k) = map(int, input().split())
a = [1 for i in range(k)]
j = 1
s1 = []
x = 1
while True:
	s1.append(x)
	x = 2 ** j
	if x > n:
		break
	j += 1
for i in range(len(a)):
	for j in range(len(s1)):
		a[i] = s1[j]
		if sum(a) == n:
			print('YES')
			for i in a:
				print(i, end=' ')
			sys.exit()
		elif sum(a) > n:
			a[i] = s1[j - 1]
			break
print('NO')


(i, k) = map(int, input().split())
pows = []
c = 0
while i > 0:
	pows.append(i & 1)
	c += 1
	i = i >> 1
pows.reverse()
s = sum(pows)
c = 0
l = len(pows) - 1
while s != k:
	while c < l and pows[c] == 0:
		c += 1
	if c >= l or s > k:
		print('NO')
		break
	pows[c] -= 1
	pows[c + 1] += 2
	s += 1
else:
	print('YES')
	for (i, el) in enumerate(pows):
		if el > 0:
			for _ in range(el):
				print(2 ** (l - i), end=' ')
	print()


from queue import PriorityQueue
(n, k) = map(int, input().split())
pq = PriorityQueue()
n1 = n
while n1 > 0:
	p2 = n1 & -n1
	pq.put(-p2)
	n1 -= p2
if pq._qsize() > k or k > n:
	print('NO')
else:
	print('YES')
	while pq._qsize() < k:
		p2 = -pq.get()
		pq.put(-p2 // 2)
		pq.put(-p2 // 2)
	res = []
	while pq._qsize() > 0:
		res.append(pq.get())
	print(' '.join(map(lambda x: str(-x), sorted(res))))


import math
(n, k) = map(int, input().split())
bi = bin(n)[2:]
l = len(bi) - 1
po = []
for i in range(len(bi)):
	if bi[i] == '1':
		po.append(pow(2, l - i))
if k < len(po) or k > n:
	print('NO')
else:
	ans = []
	j = 0
	while j < len(po):
		i = po[j]
		le = k - (len(po) - j - 1)
		if i <= le:
			s = '1 ' * i
			ans.append(s)
			le -= i
			k -= i
		elif le != 0:
			if i % le == 0:
				dig = str(i // le)
				ans.append((dig + ' ') * le)
				le = 0
			else:
				base = pow(2, math.floor(math.log(le, 2)))
				lt = (le - int(base)) * 2
				gt = le - lt
				dig = str(i // base)
				less = str(int(dig) // 2)
				ans.append((dig + ' ') * gt)
				ans.append((less + ' ') * lt)
				le = 0
		if le == 0:
			break
		j += 1
	for i in range(j + 1, len(po)):
		ans.append(str(po[i]) + ' ')
	print('YES')
	print(''.join(ans))


import math
lst = []
(n, k) = map(int, input().split())
if k > n:
	print('NO')
elif n == k:
	print('YES')
	for i in range(k):
		print(1, end=' ')
else:
	count = 0
	c = 0
	while n >= 1:
		c = int(math.log2(n))
		n -= 2 ** c
		count += 1
		lst.append(2 ** c)
	if count > k:
		print('NO')
	elif count == k:
		print('YES')
		for i in range(len(lst)):
			print(lst[-i - 1], end=' ')
	elif k - count < 100:
		while count < k:
			count += 1
			max1 = max(lst)
			inx = lst.index(max1)
			del lst[inx]
			max1 = int(max1 / 2)
			lst.append(max1)
			lst.append(max1)
		lst.sort()
		print('YES')
		print(*lst, sep=' ')
	else:
		x = k - count + 1
		cc = False
		kk = 0
		while k > len(lst):
			cc = True
			for i in range(int(math.log2(lst[kk]))):
				if k <= len(lst):
					break
				if int(lst[kk] / 2 ** i) <= x:
					cc = False
					for j in range(int(lst[kk] / 2 ** i)):
						lst.append(2 ** i)
					x = x - (int(lst[kk] / 2 ** i) - 1)
					del lst[kk]
					break
			if max(lst) == 2:
				break
			if cc:
				kk += 1
				if len(lst) <= kk:
					kk = 0
		if k > len(lst):
			lst = sorted(lst, reverse=True)
			for i in range(x - 1):
				del lst[0]
				lst.append(1)
				lst.append(1)
		lst.sort()
		cgl = 0
		print('YES')
		for i in lst:
			print(i, end=' ')


def fun(a, n):
	p = []
	if n == 1:
		return [a]
	if a == n:
		p.extend([1 for i in range(a)])
		return p
	manager = n - 1
	p = [a]
	while manager > 0:
		q = p.pop()
		p.extend([int(q / 2), int(q / 2)])
		manager = manager - 1
		if manager >= int(q / 2):
			r = p.pop()
			p = [1 for i in range(r)] + p
			manager = manager - r + 1
		elif manager < int(q / 2):
			if manager == 0:
				break
			s = p.pop()
			p = fun(s, manager + 1) + p
			manager = 0
	return p
x = str(input())
x = x.split(' ')
x = [i for i in x if x != '']
x[0] = int(x[0])
x[1] = int(x[1])

def bin1(a):
	y = bin(a)
	a = str(y).lstrip('0b')
	b = a.strip('0')
	z = b.split('0')
	z = [i for i in z if z != '']
	z = ''.join(z)
	return [a, z]
l = bin1(x[0])
cl = len(l[1])
lenny = len(l[0])
a = []
manager = x[1] - cl
activate = 1
if cl <= x[1] and x[1] <= x[0]:
	print('YES')
	for i in range(lenny):
		if l[0][i] != '0':
			if activate == 1:
				manager = manager - 2 ** (lenny - i - 1) + 1
			if activate != 1:
				a.append(2 ** (lenny - i - 1))
			if activate == 1:
				if manager > 0:
					a.extend(fun(2 ** (lenny - i - 1), 2 ** (lenny - i - 1)))
				if manager == 0:
					a.extend(fun(2 ** (lenny - i - 1), 2 ** (lenny - i - 1)))
					activate = -1
				if manager < 0:
					manager = 2 ** (lenny - i - 1) + manager
					a.extend(fun(2 ** (lenny - i - 1), manager))
					activate = -1
	a.sort()
	for i in range(x[1]):
		print(a[i], end=' ')
else:
	print('NO')


(n, k) = map(int, input().split(' '))
power1 = [int(0)] * k
a1 = k - 1
ans = 0
for i in power1:
	ans += 2 ** i

def program(power, a):
	global n, ans
	if a < 0:
		print('NO')
		return 0
	if ans == n:
		print('YES')
		for i in power1:
			print(2 ** i, end=' ')
		return None
	elif ans < n:
		ans -= 2 ** power[a]
		power[a] += 1
		ans += 2 ** power[a]
		program(power, a)
	else:
		if power[a] > 0:
			ans -= 2 ** power[a]
			power[a] -= 1
			ans += 2 ** power[a]
		a -= 1
		program(power, a)
program(power1, a1)


def main():
	a = input()
	(n, k) = [int(i) for i in a.split(' ')]
	if k > n:
		print('NO')
		return
	c = [0] * 30
	cnt = 0
	for i in range(30):
		if n & 1 << i != 0:
			c[i] += 1
			cnt += 1
	if cnt > k:
		print('NO')
		return
	print('YES')
	k -= cnt
	for i in range(29, 0, -1):
		while k > 0 and c[i] > 0:
			k -= 1
			c[i] -= 1
			c[i - 1] += 2
	res = ''
	for i in range(29, -1, -1):
		while c[i] > 0:
			c[i] -= 1
			res += str(1 << i) + ' '
	print(res)
main()


import io, os, sys
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
from heapq import *
from math import log2
heap = []
(n, kk) = map(int, input().split())
t = n
if kk > n:
	print('NO')
else:
	while t > 0:
		k = int(log2(t))
		h = 2 ** k
		heappush(heap, -k)
		t -= h
	if len(heap) == kk:
		sys.stdout.write('YES' + '\n')
		for i in heap:
			sys.stdout.write(str(2 ** (-i)) + ' ')
	elif len(heap) > kk:
		sys.stdout.write('NO' + '\n')
	else:
		while len(heap) < kk:
			k = -heappop(heap)
			heappush(heap, -(k - 1))
			heappush(heap, -(k - 1))
		sys.stdout.write('YES' + '\n')
		for i in heap:
			sys.stdout.write(str(2 ** (-i)) + ' ')


import heapq
(n, k) = map(int, input().split())
h = [-x for x in range(30) if n & 1 << x]
h.reverse()
if len(h) > k or n < k:
	print('NO')
	quit()
to_do = k - len(h)
while to_do > 0:
	x = heapq.heappop(h)
	if x == 0:
		print('NO')
		quit()
	for _ in range(2):
		heapq.heappush(h, x + 1)
	to_do -= 1
print('YES')
ans = [1 << -x for x in h]
for x in reversed(ans):
	print(x, end=' ')


(n, k) = [int(i) for i in input().split()]
str = bin(n)[2:]
l = [int(i) for i in list(str[::-1])]
p = []
for i in range(30):
	p.append(2 ** i)
if str.count('1') > k:
	print('NO')
elif k > n:
	print('NO')
else:
	length = len(l)
	for x in range(k - str.count('1')):
		for i in range(1, length):
			if l[i]:
				l[i] -= 1
				l[i - 1] += 2
				break
	if sum(l) == k:
		print('YES')
		for i in range(length):
			for x in range(l[i]):
				print(p[i], end=' ')
	else:
		print('NO')


import math

def countSetBits(n):
	count = 0
	while n:
		count += n & 1
		n >>= 1
	return count
(n, k) = map(int, input().split())
if k < countSetBits(n) or k > n:
	print('NO')
else:
	n += 1
	print('YES')
	while k:
		p = math.floor(math.log(n - k, 2))
		n -= 2 ** p
		print(2 ** p, end=' ')
		k -= 1


import collections
ans = collections.deque()
inp = map(int, input().split())
(n, k) = inp
power = [1]
p = 1
for i in range(30):
	p = p * 2
	power.append(p)
x = n
for i in range(30, -1, -1):
	if n >= power[i]:
		n -= power[i]
		ans.append(i)
l = len(ans)
if k < l or k > x:
	print('NO')
else:
	while l < k:
		x = ans.popleft()
		if x != 0:
			ans.append(x - 1)
			ans.append(x - 1)
			l += 1
		else:
			ans.append(x)
	for i in range(len(ans)):
		ans[i] = 1 << ans[i]
	print('YES')
	print(*ans)


def decimalToBinary(n):
	bits = []
	bits.append(0 if n % 2 == 0 else 1)
	while n > 1:
		n = n // 2
		bits.append(0 if n % 2 == 0 else 1)
	return bits
(n, k) = map(int, input().split())
bits = decimalToBinary(n)
i = 0
arr = []
for r in bits:
	if r == 1:
		arr.append(pow(2, i))
	i += 1
cnt = len(arr)
if cnt > k:
	print('NO')
else:
	ones = []
	while cnt < k and len(arr) > 0:
		z = arr[0]
		del arr[0]
		if z > 1:
			half = z // 2
			arr.append(half)
			arr.append(half)
			cnt += 1
		else:
			ones.append(1)
	if cnt < k:
		print('NO')
	else:
		print('YES')
		for o in ones:
			arr.append(o)
		arr.sort()
		for i in arr:
			print(i, end=' ')


from operator import itemgetter
(n, k) = map(int, input().split())
num = bin(n)[2:]
num1 = num.count('1')
if num1 > k or k > n:
	print('NO')
else:
	num2 = len(num)
	ai = [0] * num2
	for i in range(num2):
		ai[i] = int(num[i])
	i = 0
	while k > num1:
		ai[i] -= 1
		ai[i + 1] += 2
		if ai[i] == 0:
			i += 1
		num1 += 1
	print('YES')
	x = 1
	for i in range(num2 - 1, -1, -1):
		print((str(x) + ' ') * ai[i], end='')
		x <<= 1


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import sys
(n, k) = map(int, input().split())
l = []
cop = n
t = 0
while cop > 0:
	x = cop % 2 * pow(2, t)
	cop //= 2
	t += 1
	if x != 0:
		l.append(x)
l.sort(reverse=True)
if k > n or k < len(l):
	print('NO')
	sys.exit()
u = len(l) - 1
while len(l) != k:
	if l[u] == 1:
		u -= 1
		if u == -1:
			u += len(l)
	else:
		l[u] = l[u] // 2
		l.append(l[u])
l.sort()
print('YES')
print(*l)


(n, u) = map(int, input().split())
jj = u
k = str(bin(n))
k = k[2:]
lis = []
for i in range(len(k)):
	if k[i] == '1':
		lis.append(2 ** (len(k) - i - 1))
if len(lis) > u:
	print('NO')
	exit()
u = u - len(lis)
i = 0
while u > 0 and len(lis) > i:
	if lis[i] == 1:
		i = i + 1
	else:
		lis[i] = int(lis[i] / 2)
		lis.append(lis[i])
		u = u - 1
lis.sort()
if len(lis) == jj:
	for x in range(len(lis)):
		lis[x] = str(int(lis[x]))
	print('YES')
	print(' '.join(lis))
else:
	print('NO')


from heapq import heappush as push
from heapq import heappop as pop
(n, k) = map(int, input().split())
Q = []
i = 0
while n != 0:
	if n & 1:
		push(Q, -(1 << i))
	i += 1
	n = n >> 1
if len(Q) > k:
	print('NO')
else:
	while len(Q) != k:
		x = pop(Q)
		if x == -1:
			print('NO')
			exit()
		push(Q, x // 2)
		push(Q, x // 2)
	print('YES')
	Q = [-x for x in Q]
	print(*Q)


(n, k) = map(int, input().split())
b = list(bin(n)[2:])
c1 = b.count('1')
l = len(b)
if k < c1 or k > n:
	print('NO')
else:
	print('YES')
	d = k - c1
	powers = []
	newp = []
	for i in range(l - 1, -1, -1):
		if b[i] == '1':
			powers.append(2 ** int(l - 1 - i))
	while d > 0:
		p = powers.pop()
		if p == 1:
			newp.append(p)
		else:
			powers.append(p >> 1)
			powers.append(p >> 1)
			d -= 1
	powers.extend(newp)
	powers.sort()
	print(' '.join(map(str, powers)))


(n, k) = map(int, input().split())
tot = k
array = [1] * k
flag = False
if n < k:
	print('NO')
elif n == k:
	print('YES')
	print(*[1] * k)
else:
	for i in range(k - 1, -1, -1):
		while tot + array[i] <= n:
			tot += array[i]
			array[i] *= 2
		if tot == n:
			flag = True
			break
	if flag:
		print('YES')
		print(*array)
	else:
		print('NO')


(n, k) = map(int, input().split())
sum2 = {}
p2 = 1
while n:
	if n % 2:
		sum2[p2] = 1
	p2 *= 2
	n //= 2
if k < sum(sum2.values()):
	print('NO')
else:
	while sum(sum2.values()) < k and list(sum2.keys()) != [1]:
		for i in sum2.keys():
			if i == 1:
				continue
			else:
				sum2[i] -= 1
				try:
					sum2[i // 2] += 2
				except:
					sum2[i // 2] = 2
				if sum2[i] == 0:
					sum2.pop(i)
				break
	if sum(sum2.values()) == k:
		print('YES')
		for i in sum2.keys():
			for j in range(sum2[i]):
				print(i, end=' ')
	else:
		print('NO')


inp = input().split()
n = int(inp[0])
k = int(inp[1])
a = []
cc = 0
ck = k
while n != 0:
	a.append(n % 2)
	cc += n % 2
	n //= 2
a = a[::-1]
if k < cc:
	print('NO')
else:
	k -= cc
	for i in range(len(a) - 1):
		if a[i] > 0:
			temp2 = min(k, a[i])
			a[i] -= temp2
			a[i + 1] += temp2 * 2
			k -= temp2
		if k <= 0:
			break
	if k < 0 or k > 0:
		print('NO')
	else:
		print('YES')
		s = []
		for i in range(len(a)):
			for j in range(a[i]):
				s.append(str(2 ** (len(a) - i - 1)))
		s = s[::-1]
		print(' '.join(s))


import sys
(n, k) = map(int, sys.stdin.readline().split())

def find(n, k):
	pow = 0
	tmp_two = 1
	two = []
	while tmp_two <= 10 ** 9:
		pow += 1
		two.append(tmp_two)
		tmp_two = 2 ** pow
	if k > n:
		return 'NO'
	else:
		numbers = {}
		for t in two:
			numbers[t] = 0
		mx_pos = 0
		min_nums = 0
		while mx_pos != -1:
			mx_pos = -1
			while mx_pos < len(two) - 1:
				if two[mx_pos + 1] <= n:
					mx_pos += 1
				else:
					break
			if mx_pos != -1:
				n -= two[mx_pos]
				numbers[two[mx_pos]] += 1
				min_nums += 1
		if min_nums > k:
			return 'NO'
		else:
			change = len(two) - 1
			while min_nums < k:
				while numbers[two[change]] == 0:
					change -= 1
				numbers[two[change]] -= 1
				numbers[two[change - 1]] += 2
				if change <= 0:
					return 'NO'
				min_nums += 1
			ret_nums = []
			for n in numbers:
				ret_nums = ret_nums + [n] * numbers[n]
			ret_nums = [str(x) for x in ret_nums]
			return 'YES\n' + ' '.join(ret_nums)
		print(numbers)
	print(two)
print(find(n, k))


(n, k) = [int(i) for i in input().split()]
if n < k:
	print('NO')
else:
	lst = [1] * k
	delta = n - k
	for k in range(len(lst)):
		while lst[k] - 1 <= delta:
			lst[k] *= 2
		lst[k] = lst[k] // 2
		delta -= lst[k] - 1
		if delta == 0:
			print('YES')
			print(' '.join([str(i) for i in lst]))
			break
	else:
		print('NO')


from math import *
(n, k) = [int(i) for i in input().split()]
b = bin(n)[2:]
o = b.count('1')
if o > k or k > n:
	print('NO')
	quit()
print('YES')
k -= o
ans = []
for i in range(len(b) - 1, -1, -1):
	if b[i] == '1':
		t = int(pow(2, len(b) - 1 - i))
		if k >= t - 1:
			ans += [1] * t
			k -= t - 1
		else:
			l = ceil(len(b) - 1 - i - log(k + 1, 2))
			k -= pow(2, len(b) - i - 1 - l) - 1
			ans += [pow(2, l)] * int(pow(2, len(b) - i - 1 - l) - k) + [pow(2, l - 1)] * int(2 * k)
			k = 0
ans.sort()
for i in ans:
	print(int(i), end=' ')


def powersOfTwo(n, k):
	if k > n:
		return []
	bin = []
	while n > 0:
		bin.append(n % 2)
		n //= 2
	s = sum(bin)
	if s > k:
		return []
	idx = len(bin) - 1
	for i in range(k - s):
		bin[idx] -= 1
		bin[idx - 1] += 2
		if bin[idx] == 0:
			idx -= 1
	arr = []
	for i in range(idx + 1):
		if bin[i] > 0:
			power = 2 ** i
			for j in range(bin[i]):
				arr.append(power)
	return arr
[n, k] = list(map(int, input().split(' ')))
arr = powersOfTwo(n, k)
if not arr:
	print('NO')
else:
	print('YES')
	for n in arr:
		print(n, end=' ')


(n, k) = map(int, input().split())
a = bin(n)[:1:-1]
d = dict()
m = 0
for (i, x) in enumerate(a):
	d[1 << i] = x == '1'
	m += d[1 << i]
if k > n or k < m:
	print('NO')
	exit()
print('YES')
while m < k:
	p = k - m
	g = min(d[1 << i], p)
	d[1 << i] -= g
	i -= 1
	d[1 << i] += 2 * g
	m += g
r = []
for x in d:
	r += [x] * d[x]
print(*r)


from heapq import *

def main():
	(n, k) = map(int, input().split())
	if k > n:
		print('NO')
		return
	l = n.bit_length()
	require = [0] * l
	for i in range(l):
		if n & 1 << i:
			require[i] = 1
			k -= 1
			if k < 0:
				print('NO')
				return
	print('YES')
	for i in range(l):
		if require[i]:
			require[i] += min((1 << i) - 1, k)
			k -= min((1 << i) - 1, k)
			if not k:
				break
	for i in range(l):
		if require[i]:
			t = [-1 * (1 << i)]
			require[i] -= 1
			while require[i]:
				a = heappop(t)
				a = -a
				heappush(t, -(a // 2))
				heappush(t, -(a // 2))
				require[i] -= 1
			print(' '.join(map(lambda x: str(-x), t)), end=' ')
main()


(n, k) = map(int, input().split())
n = bin(n)
n = n[2:]
l = len(n) - 1
Ans = ''
i = l
comb = []
while i >= 0:
	if n[i] != '0':
		comb.append(2 ** (l - i))
	i -= 1
if len(comb) < k:
	i = len(comb) - 1
	while i >= 0 and len(comb) < k:
		if comb[i] // 2 != 0:
			num = comb.pop(i) // 2
			comb.append(num)
			comb.append(num)
			i = len(comb) - 1
		else:
			i -= 1
if len(comb) == k:
	print('YES')
	for res in comb:
		Ans += str(res) + ' '
	print(Ans)
else:
	print('NO')


import heapq

def decompose(n):
	xs = []
	c = 1
	while n != 0:
		if n & 1:
			xs.append(c)
		n >>= 1
		c <<= 1
	return xs

def works(n, k):
	xs = decompose(n)
	lower = len(xs)
	upper = sum(xs)
	return lower <= k <= upper
(n, k) = map(int, input().split())
if works(n, k):
	print('YES')
	xs = [-x for x in decompose(n)]
	heapq.heapify(xs)
	while len(xs) < k:
		w = heapq.heappop(xs)
		heapq.heappush(xs, w // 2)
		heapq.heappush(xs, w // 2)
	print(' '.join(sorted((str(-x) for x in xs))))
else:
	print('NO')


import sys
from collections import deque
input = sys.stdin.readline
(n, k) = map(int, input().split())
A = [2 ** i for i in range(31)]
A.reverse()
if n < k:
	print('NO')
	sys.exit()
LIST = []
for i in range(31):
	if A[i] <= n:
		LIST.append(A[i])
		n -= A[i]
SUM = len(LIST)
if SUM > k:
	print('NO')
	sys.exit()
Q = deque(LIST)
i = 0
while SUM != k:
	if Q[0] == 1:
		print('NO')
		break
	elif Q[0] == 2:
		Q.popleft()
		Q.append(1)
		Q.append(1)
		SUM += 1
	else:
		x = Q[0] // 2
		Q.popleft()
		Q.appendleft(x)
		Q.appendleft(x)
		SUM += 1
else:
	print('YES')
	for l in Q:
		print(l, end=' ')


import sys
a = input().split()
n = int(a[0])
k = int(a[1])

def factor(x):
	w = str(bin(x))[2:]
	return [len(w) - e[0] - 1 for e in enumerate(w) if int(e[1])]
f = factor(n)
if k < len(f):
	print('NO')
	sys.exit(0)
w = [2 ** x for x in f]
if sum(w) < k:
	print('NO')
	sys.exit(0)
print('YES')
while True:
	if len(w) == k:
		print(' '.join(map(str, w)))
		sys.exit(0)
	if w[0] == 2:
		w = w[1:] + [1, 1]
	elif w[0] < k - len(w):
		w = w[1:] + [1] * w[0]
	else:
		w = [w[0] // 2, w[0] // 2] + w[1:]


def pr(d):
	print('YES')
	for k in d:
		for _ in range(d[k]):
			print(2 ** k, end=' ')
(n, k) = map(int, input().split())
d = {}
for (p, v) in enumerate(bin(n)[:1:-1]):
	d[p] = int(v)
b = sum(d.values())
i = max(d.keys())
if k > n or k < b:
	print('NO')
else:
	while b < k:
		if d[i]:
			d[i - 1] += 2
			d[i] -= 1
			b += 1
		else:
			i -= 1
	pr(d)


def get_bit(n):
	count_shifts = 0
	while n > 1:
		n = n >> 1
		count_shifts += 1
	return pow(2, count_shifts)
str_input = input().split()
array = []
n = int(str_input[0])
k = int(str_input[1])
eh_possivel = True
if k > n:
	print('NO')
	eh_possivel = False
else:
	if n % 2 != 0:
		array.append(1)
		n -= 1
		k -= 1
	while n > 0:
		if k == 0:
			print('NO')
			eh_possivel = False
			break
		bit_mais_sig = get_bit(n)
		n -= bit_mais_sig
		k -= 1
		array.append(bit_mais_sig)
	i = 0
	while k > 0:
		if array[i] != 1:
			metade = array[i] // 2
			array[i] = metade
			array.append(metade)
			k -= 1
		else:
			i += 1
	if eh_possivel:
		print('YES')
		print(' '.join([str(x) for x in array]))


from math import log
(n, k) = map(int, input().split())
(ans, n0, ones) = ({}, n, 0)
while n0 > 0:
	ans[int(log(n0, 2))] = 1
	n0 -= 2 ** int(log(n0, 2))
	ones += 1
l = int(log(n, 2))
if ones <= k <= n:
	print('YES')
	while ones < k:
		ans[l] -= 1
		if l - 1 not in ans:
			ans[l - 1] = 0
		ans[l - 1] += 2
		if ans[l] == 0:
			l -= 1
		ones += 1
	for i in sorted(ans):
		for _ in range(ans[i]):
			print(2 ** i, end=' ')
else:
	print('NO')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for i in range(1):
		(n, k) = ria()
		z = bin(n)
		z = z[2:]
		ans = {}
		f = 0
		q = deque([])
		for i in range(30):
			ans[1 << i] = 0
			if n & 1 << i:
				f += 1
				if i > 0:
					q.append(1 << i)
				ans[1 << i] += 1
		if f > k:
			print('NO')
		else:
			while f < k and len(q) > 0:
				z = q[0]
				q.popleft()
				ans[z] -= 1
				ans[z // 2] += 2
				if z // 2 > 1:
					q.appendleft(z // 2)
					q.appendleft(z // 2)
				f += 1
			if f < k:
				print('NO')
			else:
				print('YES')
				realans = []
				for i in ans:
					for j in range(ans[i]):
						realans.append(i)
				print(*realans)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


(n, k) = map(int, input().split())
arr = [1] * k
summ = k
for i in range(k):
	while summ + arr[i] <= n:
		summ = summ + arr[i]
		arr[i] <<= 1
if sum(arr) == n:
	print('YES')
	print(*arr)
else:
	print('NO')


import math
(n, k) = map(int, input().split())
y = bin(n)
y = y[2:]
mn = 0
y = y[::-1]
r = []
c = 0
for i in y:
	if int(i) == 1:
		mn += 1
		r += [2 ** c]
	c += 1
b = 0
if mn <= k <= n:
	print('YES')
	while len(r) != k:
		while r[b] == 1:
			b += 1
		x = r[b] // 2
		r[b] = x
		r.append(x)
	print(*r)
else:
	print('NO')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
(n, k) = iia()
if k > n or bin(n)[2:].count('1') > k:
	print('NO')
else:
	res = [1] * k
	cur = k
	for i in range(k):
		while res[i] + cur <= n:
			cur += res[i]
			res[i] *= 2
		if cur == n:
			break
	print('YES')
	print(*res)


(n, k) = list(map(int, input().split()))
bin_n = bin(n)[2:]
a = []
for i in bin_n:
	a.append(int(i))
l = len(a)
s = sum(a)
if s > k:
	print('NO')
	exit()
if s == k:
	print('YES')
	for i in range(l):
		for j in range(a[i]):
			print(2 ** (l - i - 1), end=' ')
	exit()
for i in range(l - 1):
	while a[i]:
		a[i] -= 1
		a[i + 1] += 2
		s += 1
		if s == k:
			print('YES')
			for i in range(l):
				for j in range(a[i]):
					print(2 ** (l - i - 1), end=' ')
			exit()
print('NO')


(n, k) = [int(x) for x in input().split()]

def reversebinary(n):
	L = []
	while n != 0:
		L.append(n % 2)
		n = n // 2
	return L

def split(exp, pieces):
	if pieces == 1:
		return [exp]
	else:
		return split(exp - 1, pieces // 2) + split(exp - 1, pieces - pieces // 2)
R = reversebinary(n)
low = sum(R)
if k <= n and k >= low:
	print('YES')
	digits = []
	for i in range(0, len(R)):
		if R[i] == 1:
			digits.append(i)
	s = 0
	c = 0
	while s - c < k - low:
		s += 2 ** digits[c]
		c += 1
	if c > 0:
		c -= 1
	if s - c == k - low:
		print('1 ' * (k - low), end='')
		for j in range(c, len(digits)):
			print(2 ** digits[j], end=' ')
	else:
		s -= 2 ** digits[c]
		remaining = k - low - s + c
		print('1 ' * s, end='')
		for el in split(digits[c], remaining + 1):
			print(2 ** el, end=' ')
		if c + 1 <= len(digits):
			for j in range(c + 1, len(digits)):
				print(2 ** digits[j], end=' ')
else:
	print('NO')


(n, m) = map(int, input().split())
b = bin(n)[2:]
j = b.count('1')
if j <= m <= n:
	print('YES')
else:
	exit(print('NO'))
heap = []
t = 0
for i in b[::-1]:
	if i == '1':
		heap.append(int(2 ** t))
	t += 1
heap.sort()
p = 0
if heap[0] == 1:
	heap = heap[1:]
	m = m - 1
	p = 1
while len(heap) != m:
	while len(heap) != m and heap[-1] != 1:
		t = heap.pop()
		t = t // 2
		if t == 1:
			m = m - 2
			p = p + 2
		else:
			heap = heap + [t] + [t]
heap += [1] * p
print(*heap)


import math
(a, k) = map(int, input().split())
l = []
while True:
	x = math.log2(a)
	l.append(pow(2, int(x)))
	if int(x) == x:
		break
	else:
		a = a - pow(2, int(x))
if len(l) > k:
	print('NO')
else:
	l.sort()
	x = 0
	while len(l) != k and x < len(l):
		if l[x] == 1:
			x += 1
		else:
			l[x] = l[x] // 2
			l.insert(x + 1, l[x])
	if len(l) == k:
		print('YES')
		print(*l)
	else:
		print('NO')


import math
(n, k) = list(map(int, input().split()))
t = n - k
sm = 0
ost = []
pos = []
i = 0
ln = n
lk = k
if t == 0:
	rs = [1] * k
	print('YES')
	print(*rs)
else:
	while t != 0:
		k = min(n // 2, t)
		t -= k
		e = n - k * 2
		n = n // 2
		ost.append(e)
		pos.append(k)
		i += 1
		if i > int(math.log(ln, 2)):
			print('NO')
			exit()
	res = []
	for i in range(len(ost)):
		res += [2 ** i] * ost[i]
	x = len(pos)
	if x != 0:
		res += pos[-1] * [2 ** x]
	if lk > ln:
		print('NO')
	else:
		print('YES')
		print(*res)


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def case():
	(n, p) = li()
	a = bin(n)[2:]
	s = 0
	for i in a:
		s += int(i)
	if s > p:
		print('NO')
		return
	a = a[::-1]
	k = 1
	ans = []
	for i in range(len(a)):
		if a[i] == '1':
			ans.append(k)
		k *= 2
	ans.sort(reverse=True)
	pink = []
	i = 0
	c = 0
	while len(ans) < p:
		if ans[i] != 1:
			ans[i] = ans[i] // 2
			ans.append(ans[i])
		else:
			c += 1
		i += 1
		if i == len(ans):
			if c == len(ans):
				print('NO')
				return
			c = 0
			i = 0
	print('YES')
	print(*ans)
for _ in range(1):
	case()


import math

def number_of_ones_bit_representation(n):
	count = 0
	while n > 0:
		count += n % 2
		n = n // 2
	return count

def max_pot_two_under(n):
	return 2 ** int(math.log(n, 2))

def C():
	inp = input().split()
	(n, k) = (int(inp[0]), int(inp[1]))
	if k > n:
		print('NO')
		return
	if number_of_ones_bit_representation(n) > k:
		print('NO')
		return
	print('YES')
	count = 0
	power = max_pot_two_under(n)
	answer = []
	while n > 0:
		if n - power >= k - (count + 1):
			answer.append(power)
			count += 1
			n -= power
		else:
			power //= 2
	answer = [str(x) for x in answer]
	print(' '.join(answer))
C()


(n, k) = map(int, input().split(' '))
a = bin(n)[::-1]
st = []
import collections
m = collections.Counter(str(a))['1']
if k > n or k < m:
	print('NO')
	import sys
	sys.exit()
else:
	print('YES')
for u in range(0, len(a) - 2):
	if a[u] == '0':
		continue
	else:
		st.append(2 ** u)
while len(st) != k:
	for i in range(0, len(st)):
		if st[i] > 1:
			st[i] = st[i] // 2
			st.append(st[i])
		if len(st) == k:
			break
print(*st)


bits = 0
(n, k) = map(int, input().split())
maxbits = 0
a = []
for bit in range(0, 30):
	if n & 1 << bit:
		bits += 1
		maxbits += 2 ** bit
		a.append(1)
	else:
		a.append(0)
if bits > k or maxbits < k:
	print('NO')
	exit()
a = a[::-1]
for i in range(29):
	if a[i] == 0:
		continue
	diff = k - bits
	a[i + 1] += min(diff, a[i]) * 2
	bits += min(diff, a[i])
	a[i] -= min(diff, a[i])
print('YES')
a = a[::-1]
for i in range(30):
	if a[i]:
		for j in range(a[i]):
			print(2 ** i, end=' ')


(n, m) = map(int, input().split())
if n < m:
	print('NO')
	exit()
mas = [int(2 ** i) for i in range(31)]
i = 30
while n < mas[i]:
	i -= 1
ans = []
while n != 0:
	if n - mas[i] >= 0:
		n -= mas[i]
		ans.append(mas[i])
	else:
		i -= 1
ans.sort()
if len(ans) > m:
	print('NO')
	exit()
else:
	i = 0
	while len(ans) != m:
		if ans[i] != 1:
			ans[i] //= 2
			ans.append(ans[i])
		else:
			i += 1
print('YES')
print(*ans)


(n, k) = map(int, input().split())
b = []
a = []
for i in range(31):
	a.append(2 ** i)
for i in range(30, -1, -1):
	q = n - k + 1
	counter = 0
	while a[i] <= q:
		n -= a[i]
		k -= 1
		counter += 1
		q = n - k + 1
		if k == 0:
			break
	for j in range(counter):
		b.append(a[i])
	if k == 0:
		break
if n == 0 and k == 0:
	print('YES')
	print(*b)
else:
	print('NO')


(a, b) = map(int, input().split())
l = [int(1) for i in range(b)]
sum = b
for i in range(b):
	while sum + l[i] <= a:
		sum += l[i]
		l[i] *= 2
if sum == a:
	print('YES')
	for i in l:
		print(i, end=' ')
else:
	print('NO')


(n, k) = map(int, input().split())
b = format(n, 'b')
one = b.count('1')
if k < one or k > n:
	print('NO')
	exit()
print('YES')
b = list(map(int, list(b)))
for _ in range(k - one):
	for i in range(len(b) - 1):
		if b[i] >= 1:
			b[i] -= 1
			b[i + 1] += 2
			break
b.reverse()
ans = []
t = 1
for i in range(len(b)):
	for _ in range(b[i]):
		ans.append(t)
	t *= 2
print(*ans)


def my_range(start, end, other_condi):
	while start < end and other_condi:
		yield start
		start += 1
(n, k) = map(int, input().split())
ans = [1] * k
n -= k
for i in my_range(0, k, n):
	while ans[i] <= n:
		n -= ans[i]
		ans[i] <<= 1
	i += 1
if n == 0:
	print('YES')
	print(*ans)
else:
	print('NO')


(n, k) = map(int, input().split())
binn = [int(i) for i in bin(n)[2:]]
if n >= k >= binn.count(1):
	print('YES')
	b = [pow(2, i) for (i, j) in enumerate(binn[::-1]) if j]
	i = 0
	while len(b) < k:
		while b[i] > 1 and len(b) < k:
			x = b[i] // 2
			b[i] = x
			b.append(x)
		i += 1
	print(*b)
else:
	print('NO')


(n, kk) = map(int, input().split())
bn = str(bin(n))[2:]
if bn.count('1') > kk or n < kk:
	print('NO')
else:
	k = [0] * 50
	k[0] = n
	s = n
	i = 0
	while 1:
		if s <= kk:
			break
		if s - k[i] // 2 < kk:
			k[i + 1] = s - kk
			k[i] -= (s - kk) * 2
			break
		else:
			s -= k[i] // 2
			k[i + 1] = k[i] // 2
			k[i] -= k[i] - k[i] % 2
		i += 1
	print('YES')
	c = 0
	for i in k:
		if i != 0:
			print((str(2 ** c) + ' ') * i, end='')
		c += 1


(new, kite) = map(int, input().split())
array = [1] * kite
new -= kite
xen = 0
while xen < kite and new:
	while array[xen] <= new:
		new -= array[xen]
		array[xen] *= 2
	xen += 1
if new:
	print('NO')
else:
	print('YES')
	print(' '.join([str(i) for i in array]))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1
	rr = []
	for _ in range(t):
		(n, k) = LI()
		i = 1
		c = 0
		while i <= n:
			if i & n:
				c += 1
			i *= 2
		if n < k or c > k:
			rr.append('NO')
		else:
			rr.append('YES')
			r = []
			i //= 2
			while i > 0:
				while k > 0 and n - i >= k - 1:
					r.append(i)
					n -= i
					k -= 1
				i //= 2
			rr.append(JA(r, ' '))
	return JA(rr, '\n')
print(main())


def split(power, terms):
	if terms == 0:
		return []
	if terms == 1:
		return [2 ** power]
	left = terms // 2
	right = terms - left
	return split(power - 1, left) + split(power - 1, right)

def main(n, k):
	bits_n = '{0:b}'.format(n)
	count = sum((1 for bit in bits_n if bit == '1'))
	if count > k:
		print('NO')
		return
	maximum_k = sum((2 ** power for (power, bit) in enumerate(bits_n[::-1]) if bit == '1'))
	if k > maximum_k:
		print('NO')
		return
	print('YES')
	additional_terms_needed = k - count
	for (i, bit) in enumerate(bits_n):
		if bit == '0':
			continue
		power = len(bits_n) - i - 1
		additional_to_do = min(additional_terms_needed, 2 ** power - 1)
		print(' '.join((str(x) for x in split(power, 1 + additional_to_do))), end=' ')
		additional_terms_needed -= additional_to_do
	print()
(n, k) = [int(x) for x in input().split()]
main(n, k)


from math import log
(n, k) = map(int, input().split())
if n >= k:
	mass_2k = dict()
	while n:
		z = 2 ** int(log(n, 2))
		n -= z
		k -= 1
		if z in mass_2k:
			mass_2k[z] += 1
		else:
			mass_2k[z] = 1
	if k >= 0:
		while k > 0:
			ll = 0
			for b in mass_2k:
				if b > ll and mass_2k[b] != 0:
					ll = b
			if ll // 2 in mass_2k:
				mass_2k[ll // 2] += 2
			else:
				mass_2k[ll // 2] = 2
			k -= 1
			mass_2k[ll] -= 1
		print('YES')
		for u in mass_2k:
			if mass_2k[u]:
				for y in range(mass_2k[u]):
					print(u, end=' ')
	else:
		print('NO')
else:
	print('NO')


def init_split(n):
	ind = 1
	mask = ~0
	res = []
	while n != 0:
		if n & ind != 0:
			res.append(n & ind)
		ind <<= 1
		mask <<= 1
		n &= mask
	return res

def split(n, k):
	init = list(reversed(init_split(n)))
	if len(init) > k:
		return []
	offset = k - len(init)
	while offset != 0:
		if init[0] == 1:
			return []
		elif init[0] < offset + 1:
			init.extend([1] * init[0])
			offset -= init[0] - 1
			del init[0]
		else:
			init[:1] = [int(init[0] / 2)] * 2
			offset -= 1
	return init
(n, k) = map(int, input().split())
res = split(n, k)
if not res:
	print('NO')
else:
	print('YES')
	print(' '.join(map(str, res)))


def mlt():
	return map(int, input().split())
(x, y) = mlt()
if x == y:
	print('YES')
	print('1 ' * x)
	exit(0)
s = []
pw = 0
v = x
while x:
	if x % 2:
		s.append(1 << pw)
	pw += 1
	x //= 2
if y > v or y < len(s):
	print('NO')
	exit(0)
res = []
s.reverse()
cur = -1
n = 0
while n < len(s):
	if s[n] > y:
		break
	if s[n] <= y:
		rem = len(s) - n - 1
		if rem + s[n] >= y:
			cur = s[n]
			break
		else:
			y -= s[n]
			res += [1] * s[n]
			n += 1
cr = [s[n]]
y -= len(s[n + 1:]) + 1
res += s[n + 1:]
ind = 0
tm = y
while y:
	cur = cr[ind]
	cr.append(cur // 2)
	cr.append(cur // 2)
	y -= 1
	ind += 1
cr.reverse()
res += cr[:tm + 1]
print('YES')
print(*res)


(n, k) = map(int, input().strip().split())
arr = []
c = 0
m = n

def po(c):
	if c == 0:
		return 1
	elif c == 1:
		return 2
	else:
		return 2 << c - 1
while m != 0:
	if m % 2 != 0:
		arr.append(po(c))
	c += 1
	m = m // 2
if len(arr) > k:
	print('NO')
elif k > n:
	print('NO')
elif k == len(arr):
	print('YES')
	print(*arr)
else:
	c = len(arr)
	while len(arr) != k:
		c -= 1
		a = [arr[c]]
		i = 0
		while len(a) != arr[c]:
			if len(a) + len(arr) - 1 == k:
				break
			if a[i] != 1:
				a.append(a[i] // 2)
				a[i] = a[i] // 2
			i = (i + 1) % len(a)
		arr.extend(a)
		(arr[c], arr[len(arr) - 1]) = (arr[len(arr) - 1], arr[c])
		arr.pop()
	print('YES')
	print(*arr)


from collections import Counter
(n, k) = [int(i) for i in input().split()]
cnt = 0
cnt2 = 0
C = Counter()
for i in range(30):
	if n >> i & 1:
		cnt += 1
		cnt2 += 1 << i
		C[i] += 1
if k < cnt or k > cnt2:
	print('NO')
	exit()
print('YES')
k -= cnt
i = 30
while k > 0:
	if C[i] == 0:
		i -= 1
		continue
	C[i] -= 1
	C[i - 1] += 2
	k -= 1
ans = []
for (k, v) in sorted(C.items()):
	ans += [1 << k] * v
print(*ans)


from sys import stdin, stdout
import collections
import math
(N, K) = [int(x) for x in stdin.readline().split()]
b = '{0:b}'.format(N)
ones = 0
for bit in b:
	if bit == '1':
		ones += 1
if K < ones or K > N:
	print('NO')
	quit()
else:
	b = [int(x) for x in list(b)]
	cur = ones
	for i in range(len(b) - 1):
		if b[i] + cur < K:
			cur += b[i]
			b[i + 1] += b[i] * 2
			b[i] = 0
		else:
			d = K - cur
			b[i + 1] += 2 * d
			b[i] -= d
			break
	print('YES')
	b = b[::-1]
	for i in range(len(b)):
		for j in range(b[i]):
			print(2 ** i, end=' ')


import heapq

def func():
	(n, k) = map(int, input().split())
	b = bin(n)[2:]
	s = b.count('1')
	if s > k or k > n:
		print('NO')
		return None
	b = b[::-1]
	heap = [-(1 << i) for i in range(len(b)) if b[i] == '1']
	heapq.heapify(heap)
	while s < k:
		s += 1
		x = heapq.heappop(heap)
		heapq.heappush(heap, x // 2)
		heapq.heappush(heap, x // 2)
	print('YES')
	print(' '.join(map(lambda x: str(-x), heap)))
func()


import sys
import bisect
from random import randint
input = lambda : sys.stdin.readline().strip('\r\n')
from math import gcd
sa = lambda : input()
sb = lambda : int(input())
sc = lambda : input().split()
sd = lambda : list(map(int, input().split()))
se = lambda : float(input())
sf = lambda : list(input())
flsh = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7

def hnbhai():
	(n, k) = sd()
	ans = [1] * k
	n = n - k
	i = 0
	while i < k and n:
		while ans[i] <= n:
			n -= ans[i]
			ans[i] *= 2
		i += 1
	if n:
		print('NO')
		return
	print('YES')
	print(*ans)
for _ in range(1):
	hnbhai()


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heapreplace, heappushpop

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
test_case = 1
while test_case:
	test_case -= 1
	(n, k) = mi()
	if k > n:
		print('NO')
		exit()
	a = []
	x = 1
	while x < n:
		x += x
	while n:
		if x <= n:
			n -= x
			a.append(x)
		x //= 2
	if k < len(a):
		print('NO')
		exit()
	print('YES')
	k -= len(a)
	i = 0
	while k:
		if a[i] > 1:
			a[i] //= 2
			a.append(a[i])
			k -= 1
		else:
			i += 1
	print(*a)


from math import log2 as log
(n, k) = map(int, input().split())
result = []
if n % 2 == 1:
	result.append(1)
	n -= 1
	k -= 1
while n > 0 and k > 0:
	temp = int(log(n))
	j = 0
	if n > k:
		while j <= n:
			flag = pow(2, temp - j)
			j += 1
			if n - flag >= k - 1:
				result.append(flag)
				n -= flag
				k -= 1
				break
	else:
		break
if n == k:
	print('YES')
	for i in range(len(result)):
		print(result[i], end=' ')
	for i in range(n):
		print(1, end=' ')
else:
	print('NO')


(n, k) = map(int, input().split())
if k > n:
	print('NO')
	exit()
nb = bin(n)[-1:1:-1]
ans = {}
c = 0
for i in range(len(nb)):
	if nb[i] == '1':
		if nb[i] not in ans:
			ans[2 ** i] = 1
		else:
			ans[2 ** i] += 1
		c += 1
if k < c:
	print('NO')
	exit()
while c != k:
	for (i, j) in ans.items():
		if i != 1 and j != 0:
			ans[i] -= 1
			if i // 2 not in ans:
				ans[i // 2] = 2
			else:
				ans[i // 2] += 2
			break
	c += 1
print('YES')
for (k, v) in ans.items():
	for _ in range(v):
		print(k, end=' ')


import heapq
(h, m) = list(map(int, input().split()))
if h < m:
	print('NO')
else:
	a = []
	for i in range(len(bin(h)) - 2):
		if h >> i & 1 == 1:
			a.append(-1 * 2 ** i)
	if len(a) > m:
		print('NO')
	else:
		print('YES')
		k = len(a)
		while m - k > 0:
			heapq.heapify(a)
			l = heapq.heappop(a)
			z = 1
			while k - 1 + z * 2 <= m and abs(l) > 1:
				l //= 2
				z *= 2
			a.extend(z * [l])
			k += z - 1
		for i in range(len(a)):
			a[i] *= -1
		print(*a)


import math
(n, k) = [int(i) for i in input().split()]
mn = 0
x = n
while x != 0:
	mn += x % 2
	x //= 2
if k >= mn and k <= n:
	print('YES')
	z = n - k
	res = []
	while z > 0:
		y = int(math.pow(2, int(math.log2(z + 1))))
		res.append(y)
		z = z + 1 - y
	res += (n - sum(res)) * [1]
	res.reverse()
	print(' '.join([str(i) for i in res]))
else:
	print('NO')


xs = list(map(int, input().split(' ')))
b = bin(xs[0])[2:]
k = xs[1]
r = b.count('1')
ks = []
for (i, q) in enumerate(reversed(list(b))):
	if q == '1':
		ks.append(i)
if k < len(ks):
	print('NO')
else:
	stack = ks
	ans = []
	p = 0
	q = len(ks)
	while q < xs[1] and len(stack) > 0:
		x = stack.pop()
		if x == 0:
			ans.append(0)
		else:
			stack.append(x - 1)
			stack.append(x - 1)
			q += 1
	if q != k:
		print('NO')
	else:
		ans = ans + stack
		ans = ' '.join(list(map(lambda x: str(2 ** x), ans)))
		print('YES')
		print(ans)


from collections import deque
(N, K) = map(int, input().split())
if N < K:
	print('NO')
	exit()
mn = 0
que = deque()
for i in range(30, -1, -1):
	num = 2 ** i
	if N >= num:
		N -= num
		mn += 1
		que.append(num)
if len(que) > K:
	print('NO')
	exit()
while len(que) != K:
	cur = que.popleft()
	cur //= 2
	if cur != 1:
		que.appendleft(cur)
		que.appendleft(cur)
	else:
		que.append(cur)
		que.append(cur)
print('YES')
print(*sorted(que))


(N, K) = map(int, input().split())
L = [1] * K
N -= K
i = 0
while N > 0 and i < K:
	while L[i] <= N:
		N -= L[i]
		L[i] *= 2
	i += 1
if N:
	print('NO')
else:
	print('YES')
	print(*L)


def print_arr(arr, maxi):
	for i in range(40):
		if arr[i] != 0:
			if i != maxi:
				for j in range(arr[i]):
					print(2 ** i, end=' ')
			else:
				for j in range(arr[i] - 1):
					print(2 ** i, end=' ')
				print(2 ** i)
(n, k) = map(int, input().split())
tmp = n
arr = [0 for _ in range(40)]
count = 0
maxi = 0
for i in range(40)[::-1]:
	if tmp >= 2 ** i:
		arr[i] += 1
		tmp -= 2 ** i
		count += 1
		if maxi < i:
			maxi = i
if k < count or n < k:
	print('NO')
elif k == count:
	print('YES')
	print_arr(arr, maxi)
else:
	while k != count:
		if count + arr[maxi] <= k:
			count += arr[maxi]
			arr[maxi - 1] += 2 * arr[maxi]
			arr[maxi] = 0
			maxi -= 1
		elif k < count + arr[maxi]:
			temp = k - count
			arr[maxi] -= temp
			arr[maxi - 1] += 2 * temp
			count = k
	print('YES')
	print_arr(arr, maxi)


(n, k) = map(int, input().split())
a = [1] * k
n -= k
x = 0
while x < k and n:
	while a[x] <= n:
		n -= a[x]
		a[x] *= 2
	x += 1
if n:
	print('NO')
else:
	print('YES')
	print(' '.join([str(i) for i in a]))


from collections import deque

def decompose(num):
	bs = '{:b}'.format(num)
	p = len(bs) - 1
	ans = []
	for el in bs:
		if el == '1':
			ans.append(2 ** p)
		p -= 1
	return ans

def calc(num):
	return '{:b}'.format(num).count('1')

def minp2(num):
	bs = '{:b}'.format(num)
	l = len(bs)
	bs = bs[::-1]
	for i in range(0, l - 1):
		if bs[i] == '1':
			return 2 ** i
	return num // 2
(n, k) = [int(x) for x in input().split()]
if n < k or calc(n) > k:
	print('NO')
else:
	print('YES')
	terms = deque(decompose(n))
	while k > len(terms):
		new = terms.popleft()
		if new == 1:
			k -= 1
			print(1, end=' ')
		elif new == 2:
			print(1, 1, end=' ')
			k -= 2
		else:
			terms.append(new // 2)
			terms.append(new // 2)
	print(*terms)


(n, k) = map(int, input().split())
arr = [1 for _ in range(k)]
total = k
for i in range(k - 1, -1, -1):
	while total + arr[i] <= n:
		total += arr[i]
		arr[i] *= 2
if sum(arr) == n:
	print('YES')
	print(' '.join(map(str, arr)))
else:
	print('NO')


import heapq
(n, k) = map(int, input().split())
bits = [0] * 31
i = 0
l = []
n1 = n
while n > 0:
	bits[i] = n & 1
	if bits[i] == 1:
		l.append(2 ** i)
	i += 1
	n >>= 1
if k > n1 or k < len(l):
	print('NO')
else:
	length = len(l)
	for i in range(length):
		l[i] *= -1
	heapq.heapify(l)
	for i in range(length, k):
		x = heapq.heappop(l)
		heapq.heappush(l, x // 2)
		heapq.heappush(l, x // 2)
	print('YES')
	for i in l:
		print(-1 * i, end=' ')


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
(n, k) = mi()
if k < bin(n).count('1') or k > n:
	print('NO')
else:
	ans = []
	cur = bin(n).count('1')
	for i in range(30):
		if n >> i & 1:
			st = [1 << i]
			while cur < k and st:
				r = st.pop()
				if r == 1:
					ans.append(r)
					continue
				st.append(r >> 1)
				st.append(r >> 1)
				cur += 1
			ans.extend(st)
	print('YES')
	print(*ans)


(n, k) = map(int, input().strip().split())
a = []
newN = n
while newN:
	a.append(newN % 2)
	newN = newN // 2
index = []
count = [0] * len(a)
for i in range(len(a)):
	if a[i] == 1:
		index.append(i)
		count[i] += 1
m = len(index)
ans = []
if m > k or n < k:
	print('NO')
else:
	print('YES')
	if m == k:
		for i in range(m):
			ans.append(2 ** index[i])
	if m < k:
		i = len(a) - 1
		cnt = sum(count)
		while sum(count) < k:
			if i == 0:
				i = len(a) - 1
			while count[i] > 0:
				tmp = 2 ** (i - 1)
				count[i] -= 1
				count[i - 1] += 2
				cnt += 1
				if k == sum(count):
					break
			i -= 1
		for i in range(len(count)):
			if count[i]:
				ans.extend([2 ** i] * count[i])
	print(' '.join(map(str, ans)))


def main():
	(n, k) = list(map(int, input().split(' ')))
	binary = list(map(int, '{0:0b}'.format(n)))
	bin_sum = sum(binary)
	if k > n or bin_sum > k:
		print('NO')
	else:
		print('YES')
		i = 0
		dif = k - bin_sum
		while dif:
			if binary[i] <= dif:
				binary[i + 1] += binary[i] * 2
				dif -= binary[i]
				binary[i] = 0
			else:
				binary[i + 1] += dif * 2
				binary[i] -= dif
				dif = 0
			i += 1
		binary = list(reversed(binary))
		print_bin(binary)

def print_bin(binary):
	out = filter(lambda a: a != '', [' '.join([str(2 ** bi) for _ in range(binary[bi])]) for bi in range(len(binary))])
	print(' '.join(list(out)))
main()


try:
	(n, k) = map(int, input().split())
except:
	exit()
a = [1] * k
n -= k
i = 0
while i < k and n:
	while a[i] <= n:
		n -= a[i]
		a[i] *= 2
	i += 1
if not n:
	print('YES', *a)
else:
	print('NO')


(n, k) = map(int, input().split())
u = list(bin(n))[2:]
u = list(map(int, u))
s = sum(u)
if s > k or k > n:
	print('NO')
else:
	k -= s
	while k > 0:
		for i in range(len(u) - 1):
			if u[i] > 0:
				u[i] -= 1
				u[i + 1] += 2
				k -= 1
				break
	print('YES')
	ans = []
	for i in range(len(u)):
		for _ in range(u[i]):
			ans.append(2 ** (len(u) - i - 1))
	print(*ans[::-1])


import math
YesOrNo = ''

def logl(Result):
	print(*Result)

def log(n):
	print(n)

def rl():
	(Numbers, CountDels) = map(int, input().split())
	return (Numbers, CountDels)

def logic(Numbers, CountDels):
	num = [2 ** x for x in range(int(math.log(Numbers, 2) + 1))]
	_List = []
	for i in num[::-1]:
		while CountDels > 0 and Numbers - i >= CountDels - 1:
			_List.append(i)
			Numbers -= i
			CountDels -= 1
	return _List

def output(Result, Nums_time):
	if sum(Result) != Nums_time:
		YesOrNo = 'NO'
	else:
		YesOrNo = 'YES'
	return YesOrNo

def EndLog(YON, Result):
	log(YON)
	if YON == 'YES':
		logl(Result)
(Numbers, CountDels) = rl()
Nums_time = Numbers
Result = logic(Numbers, CountDels)
YON = output(Result, Nums_time)
EndLog(YON, Result)


import math
(n, k) = [int(i) for i in input().split(' ')]
ans = []
if n < k:
	print('NO')
	exit()
i = 0
while i < k:
	temp = int(math.log2(n))
	if i == k - 1 and 2 ** temp - n:
		print('NO')
		exit()
	while n - (2 ** temp + k - (i + 1)) < 0 and temp:
		temp -= 1
	curr = 2 ** temp
	n -= curr
	ans.append(curr)
	i += 1
print('YES')
print(*ans)


(n, k) = map(int, input().split(' '))
s = []
if n < k:
	print('NO')
else:
	while n > 0:
		s.append(int(n % 2))
		n = int(n / 2)
	if k < sum(s):
		print('NO')
	else:
		print('YES')
		for i in range(len(s)):
			while s[len(s) - i - 1] != 0:
				if sum(s) == k:
					break
				s[len(s) - i - 1] -= 1
				s[len(s) - i - 2] += 2
			else:
				continue
			break
		ans = []
		for i in range(len(s)):
			while s[i] != 0:
				ans.append(2 ** i)
				s[i] -= 1
		print(*ans)


(s, k) = [int(x) for x in input().split()]
bina = []
o = 0
n = s
tot2 = []
while n > 0:
	l = 0
	while 1:
		if 2 ** l > n // 2:
			bina.append(2 ** l)
			n -= 2 ** l
			break
		else:
			l += 1
if len(bina) > k:
	print('NO')
elif k > s:
	print('NO')
else:
	bina.sort()
	for item in range(k - len(bina)):
		a = bina.pop()
		while 1:
			if a == 1:
				a = bina.pop()
				tot2.append(1)
			else:
				break
		bina.append(a // 2)
		bina.append(a // 2)
	if o == 0:
		print('YES')
		bina = bina + tot2
		tot = ''
		for item in bina:
			tot += str(item) + ' '
		print(tot[:-1])