Polycarp has to solve exactly $n$ problems to improve his programming skill before an important programming competition. But this competition will be held very soon, most precisely, it will start in $k$ days. It means that Polycarp has exactly $k$ days for training!

Polycarp doesn't want to procrastinate, so he wants to solve at least one problem during each of $k$ days. He also doesn't want to overwork, so if he solves $x$ problems during some day, he should solve no more than $2x$ problems during the next day. And, at last, he wants to improve his skill, so if he solves $x$ problems during some day, he should solve at least $x+1$ problem during the next day.

More formally: let $[a_1, a_2, \dots, a_k]$ be the array of numbers of problems solved by Polycarp. The $i$-th element of this array is the number of problems Polycarp solves during the $i$-th day of his training. Then the following conditions must be satisfied:   sum of all $a_i$ for $i$ from $1$ to $k$ should be $n$;  $a_i$ should be greater than zero for each $i$ from $1$ to $k$;  the condition $a_i < a_{i + 1} \le 2 a_i$ should be satisfied for each $i$ from $1$ to $k-1$. 

Your problem is to find any array $a$ of length $k$ satisfying the conditions above or say that it is impossible to do it.


-----Input-----

The first line of the input contains two integers $n$ and $k$ ($1 \le n \le 10^9, 1 \le k \le 10^5$) — the number of problems Polycarp wants to solve and the number of days Polycarp wants to train.


-----Output-----

If it is impossible to find any array $a$ of length $k$ satisfying Polycarp's rules of training, print "NO" in the first line.

Otherwise print "YES" in the first line, then print $k$ integers $a_1, a_2, \dots, a_k$ in the second line, where $a_i$ should be the number of problems Polycarp should solve during the $i$-th day. If there are multiple answers, you can print any.


-----Examples-----
Input
26 6

Output
YES
1 2 4 5 6 8 

Input
8 3

Output
NO

Input
1 1

Output
YES
1 

Input
9 4

Output
NO

Difficulty: HARD
Tags: Greedy algorithms

Mathematics

Constructive algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
(n, k) = [int(i) for i in input().split()]

def ok(a):
	print('YES')
	print(*a)
if k * (k + 1) // 2 > n:
	print('NO')
else:
	v = (n - k * (k + 1) // 2) // k
	a = [v + i for i in range(1, k + 1)]
	if v == 0:
		if k == 2:
			if sum(a) != n:
				print('NO')
			else:
				ok(a)
		elif k == 3:
			if n == 6:
				ok(a)
			elif n == 7:
				ok([1, 2, 4])
			else:
				print('NO')
		else:
			if n - sum(a) >= 2:
				a[-2] += 1
			a[-1] += n - sum(a)
			ok(a)
	else:
		a[-1] += n - sum(a)
		ok(a)


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultdict
from collections import deque
import threading
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')

class SegmentTree:

	def __init__(self, data, default=-10 ** 6, func=lambda a, b: max(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree1:

	def __init__(self, data, default=10 ** 6, func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)
MOD = 10 ** 9 + 7

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD
mod = 10 ** 9 + 7
omod = 998244353
prime = [True for i in range(50001)]
pp = []

def SieveOfEratosthenes(n=50000):
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for i in range(50001):
		if prime[i]:
			pp.append(i)
(n, k) = map(int, input().split())
a = [0] * k
d = k * (k + 1) // 2
if k == 1:
	print('YES')
	print(n)
	sys.exit(0)
if d > n:
	print('NO')
	sys.exit(0)
a1 = (2 * n + k - k * k) // (2 * k)
s = k * (2 * a1 + k - 1) // 2
m = n - s
for i in range(k):
	a[i] = a1 + i
if m > k - 2:
	if (k == 2 or k == 3) and a1 == 1:
		print('NO')
		sys.exit(0)
	if m >= 1:
		a[-1] += 1
else:
	m += 1
for i in range(k - 1, k - m, -1):
	a[i] += 1
print('YES')
print(*a)


def solve():
	(n, k) = map(int, input().split())
	Ans = list(range(1, k + 1))
	s = k * (k + 1) // 2
	if n < s:
		print('NO')
		return
	add = (n - s) // k
	Ans = list(range(1 + add, k + 1 + add))
	add = (n - s) % k
	i = k - 1
	while i and add:
		x = min(2 * Ans[i - 1] - Ans[i], add)
		Ans[i] += x
		add -= x
		i -= 1
	if sum(Ans) != n:
		print('NO')
		return
	print('YES')
	print(*Ans)
solve()


(n, k) = map(int, input().split())
d = [0] * k
if k == 1:
	print('YES')
	print(n)
else:
	for i in range(k):
		d[i] = i + 1
	if sum(d) > n:
		print('NO')
	else:
		t = n - sum(d)
		if t >= k:
			a = t // k
			t = t % k
			for i in range(k):
				d[i] += a
		if t > 0:
			if d[0] > 1:
				for i in range(k - 1, k - 1 - t, -1):
					d[i] += 1
			elif d[0] == 1:
				for i in range(k - 1, 1, -1):
					d[i] += 1
					t -= 1
					if t == 0:
						break
				if t > 0:
					for i in range(k - 1, 2, -1):
						d[i] += 1
						t -= 1
						if t == 0:
							break
		chk = True
		for i in range(k - 1):
			if d[i + 1] > 2 * d[i]:
				chk = False
				break
		if sum(d) != n:
			chk = False
		if chk:
			print('YES')
			s = ''
			for i in d:
				s += str(i) + ' '
			print(s[:-1])
		else:
			print('NO')


rint = lambda : int(input())
rmint = lambda : map(int, input().split())
rlist = lambda : list(rmint())
(n, k) = rmint()
t = k
a = [0] * k

def no():
	print('NO')
	exit(0)
d = [-1] * (k + 1)
d[0] = 1
mx = 10 ** 9
for i in range(1, k + 1):
	if d[i - 1] * 2 > mx:
		break
	d[i] = d[i - 1] * 2
for i in range(k):
	if n < 0:
		break
	if d[t] < 0:
		p = 1
		if i:
			p = a[i - 1] + 1
	else:
		f = d[t] - 1
		p = max(1, (n + f - 1) // f)
	if i:
		p = max(p, a[i - 1] + 1)
		p = min(p, a[i - 1] * 2)
	a[i] = p
	t -= 1
	n -= p
if n:
	no()
print('YES')
for i in range(k):
	print(a[i], end=' ')


import sys

class Main:

	def __init__(self):
		self.buff = None
		self.index = 0

	def __next__(self):
		if self.buff is None or self.index == len(self.buff):
			self.buff = self.next_line()
			self.index = 0
		val = self.buff[self.index]
		self.index += 1
		return val

	def next_line(self, _map=str):
		return list(map(_map, sys.stdin.readline().split()))

	def next_int(self):
		return int(next(self))

	def solve(self):
		n = self.next_int()
		k = self.next_int()
		rs = []
		low = 1
		high = n + 1
		for i in range(0, k):
			kk = k - i
			high1 = high
			low1 = low
			while high1 - low1 > 1:
				mid = (low1 + high1) // 2
				if self.test_low(mid, n, kk):
					low1 = mid
				else:
					high1 = mid
			high2 = high
			low2 = low1
			while high2 - low2 > 1:
				mid = (low2 + high2) // 2
				if self.test_high(mid, n, kk):
					low2 = mid
				else:
					high2 = mid
			if not self.test_low(low1, n, kk) or not self.test_high(low2, n, kk):
				print('NO')
				return
			rs.append(low1)
			low = rs[-1] + 1
			high = rs[-1] * 2 + 1
			n -= rs[-1]
		print('YES')
		print(' '.join([str(x) for x in rs]))

	def test_low(self, d, n, k):
		return (2 * d + k - 1) * k // 2 <= n

	def test_high(self, d, n, k):
		return k >= 33 or (2 ** k - 1) * d >= n

def __starting_point():
	Main().solve()
__starting_point()


import sys
input = sys.stdin.readline

def main():
	(n, k) = map(int, input().split())
	if n < k or k * (k + 1) // 2 > n:
		print('NO')
		return
	if k == 1:
		print('YES')
		print(n)
		return
	d = n - k * (k + 1) // 2
	ans = [i + d // k for i in range(1, k + 1)]
	ans[-1] += d % k
	if ans[-1] > 2 * ans[-2]:
		need = ans[-1] - 2 * ans[-2]
		ans[-1] -= need
		assert 0 <= need <= 1
		if need == 1:
			if len(ans) >= 3 and ans[-3] == 1:
				print('NO')
				return
			if ans[-2] >= ans[-1] - 1:
				print('NO')
				return
			ans[-2] += 1
	print('YES')
	print(' '.join(map(str, ans)))
main()


(n, k) = [int(i) for i in input().split()]
s = int(k * (k + 1) / 2)
a = []
if k == 1:
	print('YES')
	print(n)
	exit(0)
if n - s < 0:
	print('NO')
	exit(0)
c = (n - s) // k
r = (n - s) % k
if k == 2 and r == 1 and (c == 0) or (k == 3 and r == 2 and (c == 0)):
	print('NO')
	exit(0)
for i in range(k):
	a.append(i + 1 + c)
b = (k - r) * [0] + r * [1]
for i in range(k):
	b[i] += a[i]
if r == k - 1:
	b[1] -= 1
	b[k - 1] += 1
print('YES')
res = ''
for x in b:
	res = res + str(x) + ' '
print(res)


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
s = k * (k + 1) // 2
if n < s:
	ans = 'NO'
else:
	j = (n - s) // k
	a = [i + j for i in range(1, k + 1)]
	ans = 'NO'
	x = a[0]
	c = 0
	for _ in range(k):
		c += x
		x *= 2
		if n <= c:
			ans = 'YES'
			break
	if ans == 'YES':
		s = sum(a)
		while s ^ n:
			for j in range(k - 1, 0, -1):
				if a[j] + 1 <= 2 * a[j - 1]:
					a[j] += 1
					s += 1
				else:
					break
				if s == n:
					break
print(ans)
if ans == 'YES':
	print(*a)


(n, k) = map(int, input().split())
y = pow(2, k)
y = y - 1
x = 0
if n % y == 0:
	x = n // y
else:
	x = n // y + 1
if (x + k) * (x + k - 1) / 2 - x * (x - 1) / 2 > n:
	print('NO')
else:
	a = x
	n -= x
	b = []
	c = 0
	b.insert(c, a)
	c = c + 1
	print('YES')
	for i in range(1, k):
		y = pow(2, k - i)
		y = y - 1
		p = 0
		if n % y == 0:
			p = n // y
		else:
			p = n // y + 1
		if p <= a:
			p = a + 1
		b.insert(c, p)
		c = c + 1
		a = p
		n = n - p
	print(*b)


import sys
from sys import stdin, stdout
import bisect
import math
import heapq

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
import math

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def main():
	(n, k) = cin()
	nn = n
	a = []
	s = k * (k + 1)
	s = s // 2
	n = n - s
	for i in range(k):
		a.append(i + 1)
	if n < 0:
		print('NO')
		sys.exit()
	j = n // k
	for i in range(k):
		a[i] = a[i] + j
	n = n % k
	while n > 0:
		t = 0
		for i in range(k - n, k):
			if a[i] + 1 > a[i - 1] * 2:
				continue
			else:
				a[i] += 1
				t += 1
		if t == 0:
			break
		n = n - t
	if sum(a) != nn:
		print('NO')
	else:
		print('YES')
		print(*a)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


def solve(n, k):
	r = n - k * (k + 1) // 2
	if r < 0:
		return None
	b0 = r // k
	r -= b0 * k
	seq = [None] * k
	seq[0] = b0
	b = b0
	for i in range(1, k):
		bn = b * 2 + i - 1
		h = r // (k - i)
		if h > 0:
			if h + b > bn:
				h = bn - b
			r -= h * (k - i)
			b = h + b
		seq[i] = b
	if r != 0:
		return None
	A = [b + i + 1 for (i, b) in enumerate(seq)]
	return A

def main():
	(n, k) = map(int, input().split())
	res = solve(n, k)
	if res is None:
		print('NO')
	else:
		print('YES')
		print(*res)
main()


(n, k) = map(int, input().split())
s = k * (k + 1) // 2
a = []
if k == 1:
	print('YES')
	print(n)
	exit()
if n - s < 0:
	print('NO')
	exit()
c = (n - s) // k
r = (n - s) % k
if k == 2 and r == 1 and (c == 0) or (k == 3 and r == 2 and (c == 0)):
	print('NO')
	exit(0)
for i in range(k):
	if i < k - r:
		a.append(i + 1 + c)
	else:
		a.append(i + 1 + c + 1)
if r == k - 1:
	a[1] -= 1
	a[k - 1] += 1
for i in range(len(a)):
	a[i] = str(a[i])
print('YES')
print(' '.join(a))


def check(n, k, fl, fr):
	if n < k * (2 * fl + k - 1) // 2:
		return 1
	if k <= 32 and n > fr * (2 ** k - 1):
		return -1
	return 0

def main():
	(n, k) = map(int, input().split(' '))
	(l, r) = (1, n)
	ans = []
	while k > 0:
		(ll, rr) = (l, r)
		cnt = -1
		while rr >= ll:
			mid = (ll + rr) // 2
			ck = check(n - mid, k - 1, mid + 1, mid * 2)
			if ck == 0:
				cnt = mid
				break
			elif ck < 0:
				ll = mid + 1
			else:
				rr = mid - 1
		if cnt == -1:
			print('NO')
			return
		ans.append(cnt)
		k -= 1
		n -= cnt
		l = cnt + 1
		r = min(n, cnt * 2)
	print('YES')
	print(*ans)
main()


import sys
(n, k) = map(int, input().split())
if k * (k + 1) > n * 2:
	print('NO')
elif k * (k + 1) == n * 2:
	print('YES')
	for i in range(1, k + 1):
		print(i, end=' ')
elif k == 1:
	print('YES')
	print(n)
else:
	list1 = [n // k] * k
	list1[k - 1] += n % k
	if k == 2 and n % 2 != 0:
		print('YES')
		for i in list1:
			print(i, end=' ')
		sys.exit()
	for i in range(k // 2):
		list1[i] -= k // 2 - i
		if i > 0 and list1[i] > 2 * list1[i - 1]:
			print('NO')
			sys.exit()
	if k % 2 != 0:
		for i in range(k // 2, k):
			list1[i] += i - k // 2
			if list1[i] > 2 * list1[i - 1]:
				print('NO')
				sys.exit()
	else:
		for i in range(k // 2, k):
			list1[i] += i - k // 2 + 1
			if list1[i] > 2 * list1[i - 1]:
				print('NO')
				sys.exit()
	print('YES')
	for i in list1:
		print(i, end=' ')


import sys
(n, k) = map(int, input().split())
min_cnt = k * (k + 1) // 2
if n < min_cnt:
	print('NO')
	sys.exit()
t = (n - min_cnt) // k
assert t >= 0
delta = n - (min_cnt + k * t)
a = [i + t for i in range(1, k + 1)]
pos = k - 1
while delta > 0:
	if pos == 0:
		print('NO')
		sys.exit()
	assert pos > 0
	while delta > 0 and (pos == k - 1 or a[pos] + 1 < a[pos + 1]) and (a[pos] < 2 * a[pos - 1]):
		a[pos] += 1
		delta -= 1
	pos -= 1
print('YES')
print(*a)


def solve():
	(N, K) = map(int, input().split())
	result = list(range(1, K + 1))
	Sum = K * (K + 1) // 2
	if N < Sum:
		print('NO')
		return
	add = (N - Sum) // K
	for i in range(K):
		result[i] += add
	add = (N - Sum) % K
	i = K - 1
	while i > 0 and add:
		x = min(2 * result[i - 1] - result[i], add)
		result[i] += x
		add -= x
		i -= 1
	if sum(result) != N:
		print('NO')
		return
	print('YES')
	print(' '.join(map(str, result)))
solve()


(x, y) = map(int, input().split())
if x == 8 and y == 3:
	print('NO')
	exit()
if x == 4 and y == 2:
	print('NO')
	exit()
z = []
leftover = 0
day = 0
mini = y * (y + 1) // 2
if mini > x:
	print('NO')
	exit()
elif mini == x:
	for i in range(y):
		z.append(i + 1)
else:
	leftover = x - mini
	day = leftover // y
	for i in range(y):
		z.append(i + 1 + day)
	leftover = leftover % y
	while -1 * leftover != 0:
		z[-1 * leftover] = z[-1 * leftover] + 1
		leftover = leftover - 1
for i in range(len(z) - 1):
	if z[i + 1] > 2 * z[i]:
		z[i + 1] = z[i + 1] - 1
		z[-1] = z[-1] + 1
print('YES')
print(' '.join(map(str, z)))


def mp():
	return map(int, input().split())
(n, k) = mp()
a = [i for i in range(1, k + 1)]
s = (1 + k) * k // 2
p = [0] * k
pp = 0
i = 0
while i < k and s < n:
	q = (n - s) // (k - i)
	if i == 0 or a[i] + q <= 2 * a[i - 1] + pp:
		p[i] = q
		pp += q
		s += q * (k - i)
	i += 1
if s == n:
	print('YES')
	q = 0
	for i in range(k):
		q += p[i]
		print(a[i] + q, end=' ')
else:
	print('NO')


def solve(n, k):
	if (k + 1) * k // 2 > n:
		return ''
	if k == 1:
		return str(n)
	if k == 2:
		if n % 2:
			return '%d %d' % (n // 2, n // 2 + 1)
		else:
			if n <= 4:
				return ''
			return '%d %d' % (n // 2 - 2, n // 2 + 2)
	s = (k + 1) * k // 2
	(t, m) = divmod(n, s)
	res = [v * t for v in range(1, k + 1)]
	(t, m) = divmod(m, k)
	res = [v + t for v in res]
	res = helper(res, m)
	if not check(res):
		return ''
	return ' '.join(map(str, res))

def check(res):
	for i in range(1, len(res)):
		if res[i] > res[i - 1] and res[i] <= 2 * res[i - 1]:
			continue
		return False
	return True

def helper(res, m):
	if res[0] == 1 and m >= 2 * k - 4:
		return []
	index = len(res) - 1
	while m:
		res[index] += 1
		index -= 1
		if index == 1:
			index = len(res) - 1
		m -= 1
	return res
(n, k) = map(int, input().split())
res = solve(n, k)
if not res:
	print('NO')
else:
	print('YES')
	print(res)


import sys
import math
(tasks, days) = [int(x) for x in sys.stdin.readline().split()]
if days == 1:
	print('YES')
	print(tasks)
	sys.exit(0)
min_sum = int((days + 1) * days / 2)
if min_sum > tasks:
	print('NO')
	sys.exit(0)
uncheduled = tasks - min_sum
uniform_daily_part = uncheduled // days
uncheduled = uncheduled % days
ans = []
for d in range(days):
	ans.append(1 + d + uniform_daily_part)
a = ans[-2]
b = ans[-1]
x = min(max(0, math.ceil((b + uncheduled - 2 * a) / 3)), uncheduled)
y = uncheduled - x
ans[-2] += x
ans[-1] += y
if days > 1 and ans[-2] >= ans[-1]:
	print('NO')
	sys.exit(0)
if days > 2 and ans[-3] * 2 < ans[-2]:
	print('NO')
	sys.exit(0)
sys.stdout.write('YES\n')
sys.stdout.write(' '.join([str(x) for x in ans]))


import sys
input = sys.stdin.readline
from math import floor, ceil
s = lambda n: n * (n + 1) / 2
(n, k) = map(int, input().split())
if n < s(k):
	print('NO')
else:
	x = (n - s(k)) / k
	if x % 1 == 0:
		print('YES')
		print(*[int(i + x) for i in range(1, k + 1)])
	else:
		x = int(floor(x))
		missing = int(n - (s(k) + x * k))
		res = [i + x for i in range(1, k + 1)]
		for i in range(k - missing, k):
			res[i] += 1
		if k >= 2 and res[0] * 2 < res[1]:
			res[1] -= 1
			res[-1] += 1
		for j in range(k - 1):
			if res[j] * 2 < res[j + 1]:
				print('NO')
				sys.exit()
		print('YES')
		print(*res)


def main():
	global chickens
	(n, k) = get_list()
	li = [i + 1 for i in range(k)]
	sm = sum(li)
	for i in range(k):
		inc = (n - sm) // (k - i)
		if i > 0:
			li[i] = li[i - 1] + 1
		if inc > 0 and (i == 0 or inc + li[i] <= 2 * li[i - 1]):
			sm += inc * (k - i)
			li[i] += inc
	if sm == n:
		print('YES')
		print(' '.join(map(str, li)))
	else:
		print('NO')
import sys
import math
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
out = []
get_int = lambda : int(input())
get_list = lambda : list(map(int, input().split()))
main()
print(*out, sep='\n')


kk = lambda : map(int, input().split())
ll = lambda : list(kk())
(n, k) = kk()
su = (k + 1) * k // 2
start = (n - su) // k + 1
if n < su or n > start * (2 ** k - 1):
	print('NO')
	exit()
ls = [start + i for i in range(k)]
currsum = (start - 1) * k + su
delayed = 0
for i in range(1, k):
	ls[i] += delayed
	while ls[i - 1] * 2 > ls[i] and k - i <= n - currsum:
		delayed += 1
		ls[i] += 1
		currsum += k - i
print('YES')
print(*ls)


import math

def solution():
	(n, k) = map(int, input().strip().split())
	a = []
	for i in range(k):
		mi = math.floor((2 * n / (k - i) + i + 1 - k) / 2)
		if mi < 0:
			break
		mi = 2 * a[-1] if len(a) > 0 and mi > 2 * a[-1] else mi
		a.append(mi)
		n -= mi
	if n != 0:
		print('NO')
	else:
		print('YES')
		print(' '.join(map(str, a)))
while True:
	try:
		solution()
	except:
		break


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
import threading
from collections import defaultdict
threading.stack_size(10 ** 8)
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
sys.setrecursionlimit(300000)
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')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] < key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
(n, k) = map(int, input().split())
if k == 1:
	print('YES')
	print(n)
	sys.exit(0)
a = []
cur = 0
sumw = 0
for i in range(k):
	avg = (n - sumw - (k - i - 1) * (k - i) // 2) // (k - i)
	if avg <= cur:
		print('NO')
		sys.exit(0)
	else:
		if i == 0:
			a.append(avg)
		else:
			a.append(min(cur * 2, avg))
		cur = a[-1]
		sumw += a[-1]
if sum(a) != n:
	print('NO')
else:
	print('YES')
	print(*a, sep=' ')


(n, k) = map(int, input().split())
base = k * (k + 1) // 2
if n < base:
	print('NO')
	exit(0)
l = [i + 1 + (n - base) // k for i in range(k)]
rem = (n - base) % k
if (n - base) // k == 0 and rem != 0 and (rem == k - 1):
	if k in (2, 3):
		print('NO')
		exit(0)
	else:
		l[-1] += 2
		for i in range(rem - 2):
			l[-i - 2] += 1
else:
	for i in range(rem):
		l[-i - 1] += 1
print('YES')
print(' '.join(map(str, l)))


(n, k) = list(map(int, input().split()))
if n < k * (k + 1) / 2:
	print('NO')
	exit(0)
dif = n - k * (k + 1) // 2
a = [i + 1 + dif // k for i in range(k)]
dif %= k
if dif == 0:
	print('YES')
	print(*a)
	exit(0)
if a[-1] + dif > 2 * a[-2]:
	if k == 2:
		print('NO')
		exit(0)
	if a[-2] == 2 * a[-3]:
		print('NO')
		exit(0)
	a[-2] += 1
	a[-1] += dif - 1
else:
	a[-1] += dif
print('YES')
print(*a)


def top(d, f, tot):
	zero = f * (k - d) + (k - d) * (k - d - 1) // 2
	return tot - zero
(n, k) = map(int, input().split())
a = []
if n < k * (k + 1) // 2:
	print('NO')
elif k == 1:
	print('YES')
	print(n)
else:
	const = 0
	if n > 2 ** k - 1:
		const = (n - k * (k + 1) // 2) // k
		n -= const * k
		if const == 0:
			print('NO')
	if const > 0 or n <= 2 ** k - 1:
		print('YES')
		a = [const] * k
		summ = n
		for i in range(0, k):
			a[i] += i + 1
			summ -= i + 1
		for i in range(1, k):
			if summ // (k - i) < 2 ** i - i - 1 and a[i] + summ // (k - i) <= a[i - 1] * 2:
				add = summ // (k - i)
				for j in range(i, k):
					a[j] += add
					summ -= add
				break
		while summ > 0:
			for i in range(k - 1, 0, -1):
				if a[i - 1] * 2 >= a[i] + 1:
					add = min(a[i - 1] * 2 - a[i], summ)
					a[i] += add
					summ -= add
				if summ == 0:
					break
		for x in a:
			print(x)


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
ANS = list(range(1, k + 1))
ANS.append(10 ** 9)
SUM = k * (k + 1) // 2
PLUS = 0
for i in range(k):
	if n < SUM:
		print('NO')
		sys.exit()
	y = 2 * ANS[i - 1] - ANS[i]
	x = min((n - SUM) // (k - i), y - PLUS)
	SUM += x * (k - i)
	PLUS += x
	ANS[i] = ANS[i] + PLUS
if sum(ANS[:k]) == n:
	print('YES')
	print(*ANS[:k])
else:
	print('NO')


(N, K) = list(map(int, input().split()))
a = K * (K + 1) // 2
if a > N:
	print('NO')
else:
	b = (N - a) // K
	c = N - a - b * K
	r = []
	for i in range(K):
		r.append(i + 1 + b + (1 if i + c >= K else 0))
	for i in range(K - 2):
		if r[i] * 2 < r[i + 1]:
			r[K - 1] += r[i + 1] - r[i] * 2
			r[i + 1] = r[i] * 2
	if r[K - 2] * 2 < r[K - 1]:
		print('NO')
	else:
		print('YES')
		print(' '.join(list(map(str, r))))


import sys
(n, k) = map(int, input().split())
a = [0] * (k + 2)
if k * (k + 1) > n * 2:
	print('NO')
	sys.exit()
for i in range(1, k + 1):
	a[i] = i
n -= k * (k + 1) // 2
rest = n // k
n -= rest * k
a[1] += rest
for i in range(2, k + 1):
	a[i] = a[i - 1] + 1
	rest = n // (k - i + 1)
	tmp = min(rest, a[i - 1] * 2 - a[i])
	a[i] += tmp
	n -= (k - i + 1) * tmp
if n > 0:
	print('NO')
	sys.exit()
print('YES')
for i in range(1, k + 1):
	print(a[i], end=' ')


import sys
from math import floor, ceil

def fun(n, k):
	array = [0] * k
	remaining = n - int(k * (k + 1) / 2)
	if remaining < 0:
		print('NO')
		sys.exit()
	right_most = remaining % k
	high = ceil(remaining / k)
	low = floor(remaining / k)
	for i in range(k - right_most, k):
		array[i] = high
	for i in range(k - right_most):
		array[i] = low
	for i in range(k):
		array[i] += i + 1
	if k - 1 != remaining or k == 1:
		print('YES')
		print(*array)
		sys.exit()
	elif k == 2 or k == 3:
		print('NO')
		sys.exit()
	else:
		array[1] -= 1
		array[k - 1] += 1
		print('YES')
		print(*array)
		sys.exit()
(n, k) = map(int, input().split())
fun(n, k)


from math import ceil

def low(n, k):
	if k > 30:
		return 1
	return ceil(n / (2 ** k - 1))

def high(n, k):
	return int(n / k - (k + 1) / 2 + 1)

def rng(n, k, pm=0):
	return (max(pm + 1, low(n, k)), high(n, k))
(n, k) = map(int, input().split())
(l, h) = rng(n, k)
if l <= h:
	print('YES')
	print(l, end=' ')
	n -= l
	k -= 1
	pm = l
	while k:
		(l, h) = rng(n, k, pm)
		print(l, end=' ')
		n -= l
		k -= 1
		pm = l
else:
	print('NO')


import sys

def check(s, st, n):
	sum = (st * 2 + (n - 1)) * n // 2
	return s >= sum
(m, n) = list(map(int, input().split()))
a = [0] * n
last = 0
for i in range(n):
	le = last + 1
	if i == 0:
		ri = m + 1
	else:
		ri = last * 2 + 1
	while ri - le > 1:
		mid = (le + ri) // 2
		if check(m, mid, n - i):
			le = mid
		else:
			ri = mid
	if not check(m, le, n - i):
		print('NO')
		return
	a[i] = le
	m -= le
	last = le
if m == 0:
	print('YES')
	print(*a)
else:
	print('NO')


input_ = input().split(' ')
n = int(input_[0])
k = int(input_[1])
last = 0
output = ''
if n < (k + 1) * k / 2 or (k == 3 and n == 8) or (k == 2 and n == 4):
	print('NO')
elif k == 2 and n == 3:
	print('YES')
	print('1 2')
elif k == 3 and n == 7:
	print('YES')
	print('1 2 4')
elif k <= 20001:
	for i in range(k - 1):
		last = max(n // (2 ** k - 1) + 1, last + 1)
		output = output + ' ' + str(last)
		n = n - last
		k = k - 1
	output = output + ' ' + str(n)
	print('YES')
	print(output[1:])
else:
	last = k - 50
	output = ' '.join([str(i) for i in range(1, last + 1)])
	n = n - last * (last + 1) // 2
	k = k - last
	for i in range(k - 1):
		last = max(n // (2 ** k - 1) + 1, last + 1)
		output = output + ' ' + str(last)
		n = n - last
		k = k - 1
	output = output + ' ' + str(n)
	print('YES')
	print(output)


def get_tail(k):
	return k * (k - 1) // 2

def find_starter(n, k):
	f = get_tail(k)
	starter = (n - f) // k
	return starter

def answerYES(A):
	return 'YES\n' + ' '.join(map(str, A))

def get_array(n, k):
	starter = find_starter(n, k)
	if starter < 1:
		return 'NO'
	A = [0] * k
	s = 0
	last = starter + k - 1
	for i in range(starter, starter + k):
		A[i - starter] = i
		s += i
	diff = n - s
	maxe = last - 2
	if diff > maxe:
		while diff > 0 and A[-2] * 2 - A[-1] >= 1:
			for i in range(k - 1, -1, -1):
				if i - 1 > -1 and A[i - 1] * 2 - A[i] >= 1:
					A[i] += 1
					diff -= 1
					if diff == 0:
						break
		if diff == 0:
			return answerYES(A)
		else:
			return 'NO'
	else:
		A[-1] += diff
		return answerYES(A)
	return 'NO'
(n, k) = map(int, input().split())
print(get_array(n, k))


_ = input().split()
n = int(_[0])
k = int(_[1])

def lower(k, i):
	return k * i + int(k * (k - 1) / 2)

def _max(k, i):
	return i * (pow(2, k) - 1)
if n < lower(k, 1):
	print('NO')
else:
	i = int((n - int(k * (k - 1) / 2)) / k) - 1
	while lower(k, i) <= n:
		i = i + 1
	i = i - 1
	if _max(k, i) < n:
		print('NO')
	else:
		answer = [_ + i for _ in range(k)]
		adder = n - lower(k, i)
		for _ in range(adder):
			answer[-_ - 1] = answer[-_ - 1] + 1
		if k > 2 and answer[0] == 1 and (answer[1] == 3):
			answer[1] = answer[1] - 1
			answer[-1] = answer[-1] + 1
		answer = [str(_) for _ in answer]
		print('YES')
		print(' '.join(answer))


from math import *

def f(n, k, a):
	if k == 0:
		return 0
	L = max(ceil(n / (2 ** k - 1)), a + 1)
	R = floor(n / k - (k - 1) / 2)
	if not a == 0:
		R = min(R, 2 * a)
	if R >= L:
		return L
	else:
		return 0
nk = input().split()
n = int(nk[0])
k = int(nk[1])
sol = [0] * k
subst = 0
lasta = 0
for i in range(k):
	sol[i] = f(n - subst, k - i, lasta)
	lasta = sol[i]
	subst += lasta
if 0 in sol:
	print('NO')
	exit(0)
print('YES')
print(' '.join((str(x) for x in sol)))


(n, k) = map(int, input().split())
x = k * (k + 1) // 2
(y, s) = (0, 0)
a = []
if n < x:
	print('NO')
	quit()
y = (n - x) // k
s = x + k * y
a = [i + y for i in range(1, k + 1)]
x = n - s
for i in range(k - 1, 0, -1):
	if x <= a[i - 1] * 2 - a[i]:
		a[i] += x
		x = 0
		break
	else:
		x -= a[i - 1] * 2 - a[i]
		a[i] = a[i - 1] * 2
if sum(a) != n:
	print('NO')
	quit()
print('YES')
print(' '.join(list(map(str, a))))


(n, k) = map(int, input().split())
max_x = (n - k * (k - 1) // 2) / k
if max_x < 1:
	print('NO')
	exit(0)
x = int(max_x)
r = n - (k * x + k * (k - 1) // 2)
A = [x + i for i in range(k)]
p = r + 1
while r > 0 and r != p:
	p = r
	for i in range(k - 1, 0, -1):
		q = min(r, 2 * A[i - 1] - A[i])
		r -= q
		A[i] += q
		if r == 0:
			break
if r == 0:
	print('YES')
	print(*A, sep=' ')
else:
	print('NO')


(n, k) = list(map(int, input().split()))
mi = k * (k + 1) // 2
mx = 2 ** (k - 1)
if n < mi:
	print('NO')
else:
	ans = []
	for i in range(1, k + 1):
		ans.append(i)
	remain = n - mi
	add = remain // k
	if add:
		for i in range(k):
			ans[i] += add
		remain -= k * add
	while remain:
		i = k - 1
		while remain and ans[i] < add + ans[0] * 2 ** i:
			ans[i] += 1
			i -= 1
			remain -= 1
		if ans[-1] == add + ans[0] * 2 ** (k - 1):
			break
	if remain:
		print('NO')
	else:
		print('YES')
		for a in ans[:-1]:
			print(a, end=' ')
		print(ans[-1])


import heapq
import queue
from collections import *
import math
import sys

def sieve(n):
	primes = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if primes[p] == True:
			for i in range(p * p, n + 1, p):
				primes[i] = False
		p += 1
	return primes
(n, k) = [int(ele) for ele in input().split()]
ms = k * (k + 1) // 2
f = False
if ms > n:
	print('NO')
else:
	farr = [int(ele) for ele in range(1, k + 1)]
	diff = n - ms
	prevdiff = diff
	while diff > 0:
		if diff >= k:
			farr = [ele + diff // k for ele in farr]
			diff = diff % k
		else:
			ind = k - 1
			ff = True
			while ff and diff > 0 and (ind >= 0):
				if ind == 0:
					temp = farr[1] - farr[0] - 1
				else:
					temp = 2 * farr[ind - 1] - farr[ind]
				if temp >= diff:
					farr[ind] += diff
					diff = 0
					break
				else:
					farr[ind] += temp
					diff -= temp
				ind -= 1
				if ind < 0:
					ff = False
					f = True
					break
				if diff >= prevdiff:
					ff = False
					f = True
					break
		if diff >= prevdiff:
			break
		prevdiff = diff
	for i in range(0, k - 1):
		if not (farr[i + 1] > farr[i] and farr[i + 1] <= 2 * farr[i]):
			f = True
	if diff > 0:
		f = True
	if f:
		print('NO')
	else:
		print('YES')
		print(*farr)


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


(n, k) = map(int, input().split())
if n < k * (k + 1) / 2:
	print('NO')
else:
	ar = [i + 1 for i in range(k)]
	n -= k * (k + 1) // 2
	c = n // k
	s = n % k
	for i in range(k):
		ar[i] += c
	j = k - 1
	while s > 0:
		ar[j] += ar[j - 1] - 1
		s -= ar[j - 1] - 1
		if s < 0:
			ar[j] += s
		j -= 1
	b = True
	for i in range(k - 1):
		if (ar[i + 1] > ar[i] * 2) | (ar[i] == ar[i + 1]):
			b = False
			break
	if b:
		print('YES')
		print(' '.join(map(str, ar)))
	else:
		print('NO')


(n, k) = [int(x) for x in input().split()]
a = [i for i in range(1, k + 1)]
s = k * (k + 1) // 2
p = 0
if n == s:
	p = 0
elif n > s:
	if n - s == k:
		p = 0
		for i in range(k):
			a[i] += 1
	elif n - s > k:
		d = (n - s) // k
		for i in range(k):
			a[i] += d
		p = n - s - d * k
		for i in range(k - 2, -1, -1):
			c = 2 * a[i] - a[i + 1]
			if p <= 0:
				break
			elif p >= c:
				a[i + 1] += c
				p -= c
			elif p < c:
				a[i + 1] += p
				p = 0
	elif n - s < k:
		p = n - s
		for i in range(k - 2, -1, -1):
			c = 2 * a[i] - a[i + 1]
			if p <= 0:
				break
			elif p >= c:
				a[i + 1] += c
				p -= c
			elif p < c:
				a[i + 1] += p
				p = 0
else:
	p = 1
if p <= 0:
	print('YES')
	for i in range(k):
		print(a[i], end=' ')
else:
	print('NO')


import sys
(n, k) = tuple(map(int, input().split()))
if n == 1 == k:
	print('YES')
	print(1)
	sys.exit(0)
sum_s = sum((i + 1 for i in range(k)))
if sum_s > n:
	print('NO')
	sys.exit(0)
r = (n - sum_s) // k
ost = (n - sum_s) % k
if r == 0 and ost == k - 1:
	if n == 4 or n == 8:
		print('NO')
		sys.exit(0)
	else:
		print('YES')
		print(1, 2, end='')
		for i in range(2, k - 1):
			print(' {}'.format(i + 2), end='')
		print(' {}'.format(k + 2), end='')
else:
	print('YES')
	print(r + 1, end='')
	for i in range(1, k - ost):
		print(' {}'.format(r + i + 1), end='')
	for i in range(k - ost, k):
		print(' {}'.format(r + i + 2), end='')
print()


(n, k) = map(int, input().split())
m = k * (k + 1) // 2
if n >= m:
	a = []
	a.append(0)
	rem = n - m
	t = rem // k
	for i in range(1, k + 1):
		a.append(i + t)
	rem = rem % k
	if t == 0:
		if k == 1:
			print('YES')
			print(n)
		elif k == 2:
			if n % 2 != 0:
				print('YES')
				print(n // k, n // k + 1)
			else:
				print('NO')
		elif k == 3:
			if rem == 2:
				print('NO')
			elif rem == 1:
				print('YES')
				print('1 2 4')
		else:
			for i in range(k, 0, -1):
				temp = 2 * a[i - 1] - a[i]
				blah = min(temp, rem)
				rem = rem - blah
				a[i] += blah
				if rem == 0:
					break
			print('YES')
			a = a[1:]
			print(*a)
	elif k == 1:
		print('YES')
		print(n)
	elif k == 2:
		print('YES')
		if n % 2 == 0:
			print(n // k - 1, n // k + 1)
		else:
			print(n // k, n // k + 1)
	else:
		for i in range(k, 0, -1):
			temp = 2 * a[i - 1] - a[i]
			blah = min(temp, rem)
			rem = rem - blah
			a[i] += blah
			if rem == 0:
				break
		print('YES')
		a = a[1:]
		print(*a)
else:
	print('NO')


(n, k) = [int(s) for s in input().split()]
if n < k * (k + 1) / 2:
	print('NO')
	exit()
if k == 3 and n == 8 or (k == 2 and (n < 3 or n == 4)):
	print('NO')
	exit()
print('YES')
if k == 1:
	print(n)
elif k == 2:
	print((n + 2) // 3, n - (n + 2) // 3)
else:
	i = 1
	while i * k + k * (k - 1) // 2 <= n:
		i += 1
	i -= 1
	last = i + k - 1
	last_ = last - 1
	sum = i * (k - 1) + (k - 2) * (k - 1) // 2
	last = n - sum
	if last_ * 2 >= last:
		for q in range(i, last_ + 1):
			print(q, end=' ')
		print(last)
		exit()
	last_ += 1
	last -= 1
	for q in range(i, i + k - 2):
		print(q, end=' ')
	print(last_, end=' ')
	print(last)


def main():
	(n, k) = map(int, input().split())
	if n < k * (k + 1) // 2:
		print('NO')
	else:
		add = (n - k * (k + 1) // 2) // k
		res = [x + add for x in range(1, k + 1)]
		left = n - sum(res)
		added = True
		while left > 0 and added:
			added = False
			pos = k - 1
			while pos > 0:
				while left > 0 and res[pos] + 1 <= 2 * res[pos - 1]:
					res[pos] += 1
					left -= 1
					added = True
				pos -= 1
		ok = True
		for i in range(k - 1):
			if res[i + 1] <= res[i] or res[i + 1] > 2 * res[i]:
				ok = False
				break
		if ok and left == 0:
			print('YES')
			print(*res)
		else:
			print('NO')
main()


(n, k) = map(int, input().split())
mn = k * (k + 1) // 2
if n < mn:
	print('NO')
elif k == 2 and n == 4 or (k == 3 and n == 8):
	print('NO')
else:
	print('YES')
	t = (n - mn) // k + 1
	ans = [t]
	tot = t
	for i in range(k - 1):
		ans.append(ans[-1] + 1)
		tot += ans[-1]
	rem = n - tot
	ptr = k - 1
	while rem > 0:
		if ans[ptr] < 2 * ans[ptr - 1]:
			ans[ptr] += 1
			rem -= 1
		else:
			ptr -= 1
		if ptr == 1:
			ptr = k - 1
	print(*ans)


def check(a):
	for (x, y) in zip(a[:-1], a[1:]):
		if x >= y or y > 2 * x:
			return False
	return True

def solve(n, k):
	if n < k * (k + 1) // 2:
		return ('NO', None)
	ans = list(range(1, k + 1))
	plus = n - sum(ans)
	add = plus // k
	r = plus % k
	for i in range(k):
		ans[i] += add
	if r != 0:
		last = 2 * ans[-2] - ans[-1]
		ans[-1] += min(last, r)
		if r > last:
			ans[-2] += r - last
	if check(ans) == True:
		return ('YES', ans)
	return ('NO', None)
(n, k) = map(int, input().split())
(flg, ans) = solve(n, k)
if flg == 'NO':
	print(flg)
else:
	print(flg)
	print(' '.join([str(x) for x in ans]))


from sys import stdin
from collections import defaultdict as dd
from collections import deque as dq
import itertools as it
from math import sqrt, log, log2, ceil, floor
from fractions import Fraction
(n, k) = map(int, input().split())
l = floor((2 * n + k - k ** 2) / (2 * k))
rem = abs(n - (l + l + k - 1) * k // 2)
ans = list(range(l, l + k))
ind = k - 1
while rem != 0 and ind > 0:
	prev = ans[ind - 1]
	if rem > 2 * prev - ans[ind]:
		rem -= 2 * prev - ans[ind]
		ans[ind] = 2 * prev
	else:
		ans[ind] += rem
		rem = 0
	ind -= 1
if rem != 0:
	print('NO')
else:
	for i in range(k - 1):
		if ans[i] < ans[i + 1] <= 2 * ans[i] and ans[i] >= 1:
			continue
		else:
			print('NO')
			exit()
	print('YES')
	print(*ans)