You are given positive integer number n. You should create such strictly increasing sequence of k positive numbers a_1, a_2, ..., a_{k}, that their sum is equal to n and greatest common divisor is maximal.

Greatest common divisor of sequence is maximum of such numbers that every element of sequence is divisible by them.

If there is no possible sequence then output -1.


-----Input-----

The first line consists of two numbers n and k (1 ≤ n, k ≤ 10^10).


-----Output-----

If the answer exists then output k numbers — resulting sequence. Otherwise output -1. If there are multiple answers, print any of them.


-----Examples-----
Input
6 3

Output
1 2 3

Input
8 2

Output
2 6

Input
5 3

Output
-1

Difficulty: interview

Starter code:

Solutions:
n, k = map(int, input().split())
div = []
i = 1
n1 = n
while i * i <= n:
    if n % i == 0:
        div.append(i)
        div.append(n // i)
    i += 1
div.sort()
mx = -1
for i in range(len(div)):
    a = div[i] * k * (k + 1) // 2
    if a <= n:
        mx = div[i]
if mx == -1:
    print(-1)
else:
    for i in range(k - 1):
        print(mx * (i + 1), end= " ")
    print(n - mx * k * (k - 1) // 2)

    

import sys

inf = 1 << 30

def solve():
    n, k = map(int, input().split())

    lim = k * (k + 1) // 2

    if n < lim:
        print(-1)
        return

    d_max = 1

    for d in range(1, n + 1):
        if d*d > n:
            break
        if n % d != 0:
            continue

        q = n // d

        if d >= lim:
            d_max = q
            break
        elif q >= lim:
            d_max = d
        else:
            break

    ans = []
    j = 1

    for i in range(k - 1):
        ans.append(d_max * j)
        j += 1

    ans.append(n - sum(ans))

    print(*ans)

def __starting_point():
    solve()
__starting_point()

def factor(n):
    rtn = []
    p = 2
    tmp = n
    while p * p <= tmp:
        q = 0
        while tmp % p == 0:
            tmp //= p
            q += 1
        if 0 < q:
            rtn.append((p, q))
        p += 1
    if 1 < tmp:
        rtn.append((tmp, 1))
    return rtn

def divs(n):
    rtn = [1]
    arr = factor(n)
    for p, q in arr:
        ds = [p**i for i in range(1, q + 1)]
        tmp = rtn[:]
        for d in ds:
            for t in tmp:
                rtn.append(d * t)
    return list(sorted(rtn))

n, k = list(map(int, input().split()))
ds = divs(n)
l = 0
r = len(ds) - 1
while l + 1 < r:
    c = (l + r) // 2
    if ds[c] * k * (k + 1) // 2 <= n:
        l = c
    else:
        r = c

if l == 0 and n < k * (k + 1) // 2:
    print(-1)
else:
    d = ds[l]
    ans = [d * (i + 1) for i in range(k)]
    ans[-1] += n - sum(ans)
    print(' '.join(map(str, ans)))



import math
n, k = map(int, input().split())
if (k*(k+1))/2 > n:
    print(-1)

else:
    c = int( n/ ((k*(k+1))/2))
    a = []
    for i in range(1, int( math.sqrt(n) + 1 ) ):
        if i*i == n:
            a.append(i)
        elif n%i == 0:
            a.append(i)
            a.append(n//i)
            
    a = sorted(a)
    s = 0
    for i in range(len(a)):
        s+=1
        if a[i] > c:
           break 
    c = a[ s - 2]
    for i in range(1, k):
        print(c*i, end= " ")
    print(str( int(n - c*(k*(k-1)/2)  ) ))


import math
n, k = list(map(int, input().split()))
if (k*(k+1))/2 > n:
    print(-1)

else:
    c = int( n/ ((k*(k+1))/2))
    a = []
    for i in range(1, int( math.sqrt(n) + 1 ) ):
        if i*i == n:
            a.append(i)
        elif n%i == 0:
            a.append(i)
            a.append(n//i)
            
    a = sorted(a)
    s = 0
    for i in range(len(a)):
        s+=1
        if a[i] > c:
           break 
    c = a[ s - 2]

    ans = list(map(str, list(range(c, c*k, c)) ))
    ans.append( str( int(n - c*(k*(k-1)/2)  ) ))
    print(" ".join(ans))


n, k = map(int, input().split())
div = []
i = 1
n1 = n
while i * i <= n:
    if n % i == 0:
        div.append(i)
        div.append(n // i)
    i += 1
div.sort()
mx = -1
for i in range(len(div)):
    a = div[i] * k * (k + 1) // 2
    if a <= n:
        mx = div[i]
if mx == -1:
    print(-1)
else:
    for i in range(k - 1):
        print(mx * (i + 1), end= " ")
    print(n - mx * k * (k - 1) // 2)

def to_str(arr):
    if arr == -1:
        return -1
    for i in range(len(arr)):
        arr[i] = str(arr[i])
    return ' '.join(arr)


def get_seq(n, k, mult=1):
    if n < round(k * (k + 1) / 2):
        return -1
    ans = []
    for i in range(k):
        ans.append((i + 1) * mult)
    ans[k - 1] = (n - round(k * (k - 1) / 2)) * mult
    return ans


def get_seq_new(n, k):
    if n < round(k * (k + 1) / 2):
        return -1

    pre_val = []

    for num in range(2, round(n ** 0.5) + 1):
        if n % num == 0:
            if num >= round(k * (k + 1) / 2):
                return get_seq(num, k, round(n / num))
            if round(n / num) >= round(k * (k + 1) / 2):
                pre_val = get_seq(round(n / num), k, num)
    if len(pre_val) > 0:
        return pre_val
    return get_seq(n, k)


s = input()
n = int(s.split(' ')[0])
k = int(s.split(' ')[1])
print(to_str(get_seq_new(n, k)))


import sys

inf = 1 << 30

def solve():
    n, k = map(int, input().split())

    # list divisors of n
    a = []
    b = []

    for d in range(1, n + 1):
        if d*d > n:
            break
        if n % d != 0:
            continue

        a.append(d)
        b.append(n // d)

    b.reverse()

    if a[-1] == b[0]:
        divs = a + b[1:]
    else:
        divs = a + b

    # main process

    d_m = -1
    need = k * (k + 1) // 2

    for d in divs:
        q = n // d

        if q >= need:
            d_m = d
        else:
            break

    if d_m == -1:
        print(-1)
    else:
        ans = [0]*k

        for i in range(k - 1):
            ans[i] = (i + 1) * d_m

        ans[-1] = n - d_m * k * (k - 1) // 2

        print(*ans)

def __starting_point():
    solve()
__starting_point()

import math

def divisorGenerator(n):
    large_divisors = []
    for i in range(1, int(math.sqrt(n) + 1)):
        if n % i == 0:
            yield i
            if i*i != n:
                large_divisors.append(n / i)
    for divisor in reversed(large_divisors):
        yield divisor


    
        
def result(n,k):
    Main = []
    Last = n
    for i in range(1,n*2):
        if k==1:
            break
        Main.append(i)
        Last -= i
        k -= 1
    Main.append(Last)
    return Main
    
n,k = list(map(int,input().split()))
divisors = list(divisorGenerator(n))
for i in range(len(divisors)):
    divisors[i] = int(divisors[i])
    
kk = (k**2+k)//2
if n<kk:
    print(-1)
else:
    oo = n//(kk)
    pp = 1
    for i in divisors:
        if i <= oo:
            pp = i
    oo = pp
    w = result(n//oo,k)
    s = ""
    for i in w:
        s += " "+str(i*oo)
    print(s[1:])
            
    
        
            
                
    


import sys
import math
n, k = map(int, input().split())
x =(k * (k + 1)) // 2
cur = 1
s = math.sqrt(n)
div = 0
while( cur <= s):
    if( n % cur == 0):
        if(n // cur >= x):
            div = max(div, cur)
        if(cur >= x):
            div = max(div, n // cur)
    cur += 1
if(div == 0):
    print(-1)
    return
rest = n // div
for i in range(1,k + 1):
    if( i == k):
        print( div * rest, end = ' ')
    else:
        print(div * i, end = ' ')
    rest -= i

from math import sqrt

n , k = (int(i) for i in input().split())

def Provera (n, k):
	if (k * (k + 1)) // 2 > n:
		return True

if (Provera(n,k)):
	print (-1)
	return

for i in range(2, int(sqrt(n)) + 1):
	if (n % i == 0):
		NZD = n // i
		if not (Provera (i , k)):
			if (k * (k + 1)) // 2  == i:
				for j in range(1, k + 1):
					print (NZD * j,end = ' ')
				return
			if (k * (k + 1)) // 2  < i:
				for j in range(1, k):
					print (NZD  * j,end = ' ')
				print (n - NZD * ((k * (k - 1)) // 2))
				return
for i in range(int(sqrt(n)) + 1, 0, -1):
	if (n % i == 0):
		if not (Provera (n // i , k)):
			if (k * (k + 1)) // 2  ==  (n // i):
				for j in range(1, k + 1):
					print (i * j,end = ' ')
				return
			if (k * (k + 1)) // 2  < (n // i):
				for j in range(1, k):
					print (i  * j,end = ' ')
				print (n - i * ((k * (k - 1)) // 2))
				return
if (k * (k + 1)) // 2 == n:
	for i in range(1, k + 1):
		print (i, end = ' ')
else:
	for i in range(1, k):
		print (i, end = ' ')
	print (n - (k * (k - 1)) // 2)

n, k = list(map(int, input().split()))
d = k*(k+1)//2
if n < d:
  print(-1)
else:
  u = 1
  for j in range(1, int(n**0.5)+2):
    if n % j == 0:
      jj = n // j 
      if j >= d and jj > u:
        u = jj
      elif jj >= d and j > u: 
        u = j
  res = [u*i for i in range(1, k)]
  res.append(n - sum(res))
  print(*res)
      
  


N, K = map( int, input().split() )
if K * ( K + 1 ) // 2 > N:
  exit( print( -1 ) )
ans = 1
for i in range( 1, int( N ** 0.5 ) + 1 ):
  if N % i: continue
  if ans < i:
    if K * ( K + 1 ) // 2 <= N // i:
      ans = i
  if ans < N // i:
    if K * ( K + 1 ) // 2 <= i:
      ans = N // i
t = N // ans
for i in range( 1, K + 1 ):
  print( i * ans if i < K else N - ( K - 1 ) * K // 2 * ans, end = " \n"[ i == K ] )


def main():
    from math import sqrt
    n, k = list(map(int, input().split()))
    g, x = n * 2 // ((k + 1) * k), n
    if not g:
        print(-1)
        return
    divisors = [1]
    p = q = 1
    while not x % 2:
        x //= 2
        q *= 2
        divisors.append(q)
    while True:
        lim = int(sqrt(x))
        if p >= lim:
            break
        for p in range(p + 2, lim + 2, 2):
            if not x % p:
                l, q = [], 1
                while not x % p:
                    x //= p
                    q *= p
                    l.append(q)
                divisors += [p * q for p in l for q in divisors]
                break
        else:
            break
    if x != 1:
        divisors += [x * q for q in divisors]
    g = max(p for p in divisors if p <= g)
    print(' '.join(map(str, list(range(g, g * k, g)))), n - g * (k - 1) * k // 2)


def __starting_point():
    main()

__starting_point()

n, k = map(int, input().split())
g = n * 2 // ((k + 1) * k)
if not g:
    print(-1)
    return
ee = [2 ** i for i in range(31) if not n % 2 ** i]
x = n // ee[-1]
oo = [(o, x // o) for o in range(1, int(x ** .5) + 1, 2) if not x % o]
g = max(o * e for t in oo for o in t for e in ee if o * e <= g)
print(' '.join(map(str, range(g, g * k, g))), n - g * (k - 1) * k // 2)

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math


def main():
    n, k = map(int, input().split())
    base = int(k * (k + 1) / 2)
    if n < base:
        print('-1')
        return
    closest = None
    for i in range(base, int(math.sqrt(n))):
        if n % i == 0:
            closest = i
            break
    if closest is None:
        for i in range(int(math.sqrt(n) + 1), 0, -1):
            if n % i == 0 and base <= n / i:
                closest = n / i
                break
    multiplier = int(n / closest)
    for i in range(1, k):
        print(i * multiplier, end=' ')
    print(int((k + closest - base) * multiplier))


def __starting_point():
    main()

__starting_point()

n,k = list(map(int,input().split()))
if 2*n<k*(k+1):
	print(-1)
	return
mx = 0

def ok(d):
	sm = k*(k-1)//2
	sm *= d
	if sm+k>n:
		return False
	if (n-sm>((k-1)*d)):
		return True
	else:
		return False

i = 1
while i*i<=n:
	if n%i==0:
		if ok(i): mx = max(mx,i)
		if ok(n//i): mx = max(mx,n//i)
	i+= 1
ans = ''
for i in range(1,k):
	ans += str(i*mx)+' '
ans += str(n-((k*(k-1))//2)*mx)
print(ans)


def ma():
    s=input()
    nums=s.split(' ')
    n=int(nums[0])
    k=int(nums[1])
    base=k*(k+1)//2
    if n<base:
        print(-1)
        return 
    m=n//base
    if m*m<=n:
        while n%m!=0:
            m-=1
    else:
        p=(n-1)//m+1
        while p*p<=n and n%p!=0:
            p+=1
        if n%p==0:
            m=n//p
        else:
            q=(n-1)//m
            while n%q!=0:
                q-=1
            m=q
            
    for i in range(k-1):
        print(str((i+1)*m),end='')
        print(' ',end='')
    print(n-k*(k-1)//2*m)
ma()

from math import sqrt
n, k = list(map(int, input().split()))
def f(s):
    for v in range(1, 1 + int(sqrt(n))):
        if n % v == 0:
            yield v
            yield n // v
s = k * (k + 1) // 2
v = set(x for x in f(s) if x <= n // s)
if v:
    gcd = max(v)
    print(*list(range(gcd, gcd * k, gcd)), n - gcd * (k - 1) * k // 2)
else:
    print(-1)



import sys

line = sys.stdin.readline()
line.strip()
comp = line.split(' ')
n = int(comp[0])
k = int(comp[1])

if(k*(k+1)//2 > n):
    print("-1")
    return

divs = []

d = 1
while(d*d <= n):
    if n%d == 0:
        divs.append(d)
        divs.append(n//d)
    d+=1

maxDiv = 0

for dv in divs:
    if (k+1)*k//2 <= dv:
        maxDiv = max(maxDiv,n//dv)
    if (k+1)*k//2 <= n//dv:
        maxDiv = max(maxDiv,dv)


arr = [maxDiv*x for x in range(1,k)] + [n-k*(k-1)//2*maxDiv]
print(" ".join(map(str,arr)))









from math import sqrt
n, k = list(map(int, input().split()))
K = (k*(k+1))//2
if n < K:
  print(-1)
else:
  N = n//K
  ret = -1
  for i in range(1,min(N,int(sqrt(n)))+1):
    if n%i == 0:
      if i > ret:
        ret = i
      ni = n//i
      if i < ni and ni <= N:
        if ni > ret:
          ret = ni
          break
  ans = [ret*i for i in range(1,k)]
  ans.append(n-sum(ans))
  print(' '.join(map(str,ans)))


n, k = map(int, input().split())
ans = 0
for i in range(1, round(n ** 0.5) + 2):
  if n % i == 0:
    if k * (k - 1) // 2 * i < n and n - k * (k - 1) // 2 * i > 0 and n - k * (k - 1) // 2 * i > (k - 1) * i:
      ans = max(ans, i)
    i = n // i
    if k * (k - 1) // 2 * i < n and n - k * (k - 1) // 2 * i > 0 and n - k * (k - 1) // 2 * i > (k - 1) * i:
      ans = max(ans, i)
      i = n // i
if k * (k + 1) // 2 > n:
  print(-1)
else:
  print(" ".join([str(ans * i) for i in range(1, k)] + [str(n - k * (k - 1) // 2 * ans)]))

str_params = input()
[n, k]= [int(s) for s in str_params.split(' ')]
parts = (1+k)/2*k
if parts<=n:
	nod = n/parts
	while (nod%1!=0)|(parts%1!=0):
		if nod<parts:
			if nod%1!=0:
				nod = int(nod)
			else:
				nod = nod-1
			parts = n/nod
		else:
			if parts%1!=0:
				parts = int(parts)+1
			else:
				parts = parts+1
			nod = n/parts
	numbers = [nod*(x+1) for x in range(k)]
	numbers[k-1] = n-(1+k-1)/2*(k-1)*nod
	
	if numbers[0]==0:
		print(-1)
	else:
		print(' '.join(map(str,list(map(int, numbers)))))
else:
	print(-1)
	
"""while (sum(numbers)<n):
	

	33/5 = 6.6
	33/11 = 3
	
	33/6 = 5.5
	
	24/10 = 2.4
	
	
	
i = 1
while (sum(numbers)<n) & (i<k):
	while sum(numbers)<n:
		numbers = [numbers[x]*i for x in range(k)]
		print (i, numbers)
		i = i+1
print (numbers)
if sum(numbers)>n:
	print (-1)
if sum(numbers)==n:
	print (' '.join(map(str,numbers)))"""
	


import math

def divisorGenerator(n):
    large_divisors = []
    for i in range(1, int(math.sqrt(n) + 1)):
        if n % i == 0:
            yield i
            if i*i != n:
                large_divisors.append(n / i)
    for divisor in reversed(large_divisors):
        yield divisor

n,k = list(map(int,input().strip().split(' ')))
l = list(map(int,divisorGenerator(n)))
lenght = len(l)-1
flag = True
while lenght>=0 :
    p = l[lenght]
    if p * (int(n / p)) == n and k <= int(n / p) - int((k * (k - 1)) / 2):
        for i in range(1, k):
            print(p * i, end=' ')
        print(p * (int(n / p) - int((k * (k - 1)) / 2)))
        flag = False
        break
    lenght -= 1
if flag: 
    print(-1)