#include <bits/stdc++.h>

typedef unsigned long long ll;
using namespace std;

int main(){

    ll n, k; scanf("%lld %lld\n", &n, &k);

    set <int> d;

    for(int i=1; i<=(int)sqrt(n)+1; i++){
        if(n % i == 0){
            d.insert(i);
            d.insert(n / i);
        }
    }

    set<int>::reverse_iterator it = d.rbegin();

    while(it != d.rend()){
        ll cnt = (*it) * (k*(k-1) / 2);
        long long remain = n - cnt;
        if(remain <= 0 || remain <= (*it) * (k-1) || cnt > n){
            it++;
            continue;
        }

        for(int i=1; i<k; i++)
            printf("%lld ", 1LL * (*it) * i);
        printf("%lld\n", remain);
        return 0;
    }

    cout << "-1" << endl;
    return 0;
}


#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

int main(){

    ll n, k; scanf("%lld %lld\n", &n, &k);

    set <ll> d;

    for(int i=1; i<=(int)sqrt(n)+1; i++){
        if(n % i == 0){
            d.insert(i);
            d.insert(n / i);
        }
    }
    set<ll>::reverse_iterator it = d.rbegin();

    while(it != d.rend()){
        ll cnt = (*it) * (k*(k-1) / 2);
        long long remain = n - cnt;
        if(remain <= 0 || remain <= (*it) * (k-1) || cnt > n){
            it++;
            continue;
        }

        for(int i=1; i<k; i++)
            printf("%lld ", 1LL * (*it) * i);
        printf("%lld\n", remain);
        return 0;
    }

    cout << "-1" << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    long long n, k; scanf("%lld %lld", &n, &k);

    set <long long> dd;
    for(int i=1; i<=sqrt(n)+1; i++){

        if(n % i == 0){
            dd.insert(i); dd.insert(n / i);
        }
    }

    vector <long long> d(dd.begin(), dd.end());
    bool found = false;
    for(int i=d.size()-1; i>=0; i--){

        long long sum = d[i]*(k*(k-1)/2);
        if(n - sum > (k-1)*d[i]){

            found = true;

            for(int j=1; j<k; j++)
                printf("%lld ", j*d[i]);
            printf("%lld\n", n-sum);
            break;
        }
    }

    if(found == false) cout << -1 << endl;
    return 0;
}


#include <bits/stdc++.h>

typedef unsigned long long ll;
using namespace std;

int main(){

    ll n, k; scanf("%lld %lld\n", &n, &k);

    set <ll> d;

    for(int i=1; i<=(int)sqrt(n)+1; i++){
        if(n % i == 0){
            d.insert(i);
            d.insert(n / i);
        }
    }
    set<ll>::reverse_iterator it = d.rbegin();

    while(it != d.rend()){
        ll cnt = (*it) * (k*(k-1) / 2);
        long long remain = n - cnt;
        if(remain <= 0 || remain <= (*it) * (k-1) || cnt > n){
            it++;
            continue;
        }

        for(int i=1; i<k; i++)
            printf("%lld ", 1LL * (*it) * i);
        printf("%lld\n", remain);
        return 0;
    }

    cout << "-1" << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
    long n, k; scanf("%ld %ld", &n, &k);

    vector <long> d = {};
    for(int i=1; i<=sqrt(n)+1; i++){

        if(n % i == 0){
            d.push_back(i); d.push_back(n / i);
        }
    }

    bool found = false;
    for(int i=d.size()-1; i>=0; i--){

        long sum = d[i]*(k*(k-1)/2);
        if(n - sum > (k-1)*d[i]){
            found = true;

            for(int j=1; j<k; j++)
                printf("%ld ", j*d[i]);
            printf("%ld\n", n-sum);
            break;
        }
    }

    if(found == false) cout << -1 << endl;
    return 0;
}


#include<bits/stdc++.h>
typedef unsigned long long ll;
using namespace std;

int main(){

    ll n, k; scanf("%lld %lld\n", &n, &k);

    set <ll> d;

    for(int i=1; i<=sqrt(n) + 1; i++){
        if(n % i == 0){
            d.insert(i); d.insert(n / i);
        }
    }

    for(set<ll>::reverse_iterator it = d.rbegin(); it != d.rend(); it++){
        ll elem = *it;
        ll ss = elem*(k*(k-1) >> 1);

        if(n > ss && n - ss > elem*(k - 1)) {
            for(int i=1; i<k; i++)
                printf("%lld ", (ll)i*elem);
            printf("%lld\n", n - (elem * (k*(k-1)>>1)));
            return 0;
        }
    }
    puts("-1");
    return 0;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

int main()
{
	l2 n,k,y,i,j;
	bool c = false;
	cin >> n >> k;
	unsigned l2 start = clock();
	y = n;
	vector <l1> d;
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n && y > 1)
  		{
  			if(y % i == 0)
  				{
  					if(!c)
  						d.pb(i);
  					c = true;
  					y /= i;
  				} else
  					{
  						c = false;
  						i++;
  					}
  		}
  	for(i = d.size() - 1; i >= 0; i--)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					printf("%d ", n);
  					unsigned l2 stop = clock();
  					cout << endl;
  					double t = (stop - start) / 1000.0;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	printf("%d ", n);
  	unsigned l2 stop = clock();
  	cout << endl;
  	double t = (stop - start) / 1000.0;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) / 2 * k > n || k >= 500000 || k >= n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

int main()
{
	l2 n,k,y,i,j;
	bool c = false;
	cin >> n >> k;
	unsigned l2 start = clock();
	y = n;
	vector <l1> d;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i <= n / 2)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  				}
  		  	i++;
  		}
  	for(i = d.size(); i >= 0; i--)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					printf("%d ", n);
  					unsigned l2 stop = clock();
  					cout << endl;
  					double t = (stop - start) / 1000.0;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	printf("%d ", n);
  	unsigned l2 stop = clock();
  	cout << endl;
  	double t = (stop - start) / 1000.0;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	if(n == 3 && k == 2)
		{
			cout << 1 << ' ' << 2;
			return 0;
		} else
			{
				if(n == 5 && k == 2)
					{
						cout << 2 << ' ' << 3;
					}
			}
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) / 2 * k > n || k >= 500000 || k >= n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

int main()
{
	l2 n,k,y,i,j;
	cin >> n >> k;
	y = n;
	vector <l2> d;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i <= n / 2)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  				}
  		  	i++;
  		}
  	for(i = d.size() - 1; i >= 0; i--)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					printf("%d ", n);
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	printf("%d ", n);
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

int main()
{
	unsigned l2 n,k,y,i,j;
	cin >> n >> k;
	y = n;
	vector <unsigned l2> d;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  				}
  		  	i++;
  		}
  	sort(d.begin(),d.end());
  	for(i = d.size() - 1; i > 0; i--)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					cout << (d[i] + k * d[i]) * k / 2 << endl;
  					return 0;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

int main()
{
	l2 n,k,y,i,j;
	cin >> n >> k;
	y = n;
	vector <l2> d;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  				}
  		  	i++;
  		}
  	sort(d.begin(),d.end());
  	for(i = d.size() - 1; i >= 0; i--)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					printf("%d ", n);
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	printf("%d ", n);
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) / 2 * k > n || k >= n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n || k >= n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) / 2 * k > n || k >= 500000)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

int main()
{
	l2 n,k,y,i,j;
	bool c = false;
	cin >> n >> k;
	unsigned l2 start = clock();
	y = n;
	vector <l1> d;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n && y > 1)
  		{
  			if(y % i == 0)
  				{
  					if(!c)
  						d.pb(i);
  					c = true;
  					y /= i;
  				} else
  					{
  						c = false;
  						i++;
  					}
  		}
  	for(i = d.size() - 1; i >= 0; i--)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					printf("%d ", n);
  					unsigned l2 stop = clock();
  					cout << endl;
  					double t = (stop - start) / 1000.0;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	printf("%d ", n);
  	unsigned l2 stop = clock();
  	cout << endl;
  	double t = (stop - start) / 1000.0;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					cout << (d[i] + k * d[i]) * k / 2 << endl;
  					return 0;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

int main()
{
	l2 n,k,y,i,j;
	cin >> n >> k;
	y = n;
	vector <l2> d;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  				}
  		  	i++;
  		}
  	sort(d.begin(),d.end());
  	for(i = d.size() - 1; i >= 0; i--)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) * k / 2 > n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	if(n == 3 && k == 2)
		{
			cout << 1 << ' ' << 2;
			return 0;
		}
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) / 2 * k > n || k >= 500000 || k >= n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	q_sort(0,d.size() - 1);
  	for(i = 0; i < d.size(); i++)
  		{
  			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
  				{
  					j = 1;
  					while(j < k)
  						{
  							printf("%d ", d[i] * j);
  							n -= d[i] * j;
  							j++;
  						}
  					cout << n;
  					return 0;
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) / 2 * k > n || k >= 500000 || k >= n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	if(d.size() != 0)
  		{
  			q_sort(0,d.size() - 1);
         	for(i = 0; i < d.size(); i++)
         		{
         			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
         				{
         					j = 1;
         					while(j < k)
         						{
         							printf("%d ", d[i] * j);
         							n -= d[i] * j;
         							j++;
         						}
         					cout << n;
         					return 0;
         				}
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


#include <bits/stdc++.h>

#define l1 long
#define l2 long long
#define pb push_back

using namespace std;

vector <unsigned l2> d;

void q_sort(l2 l, l2 r)
	{
		l2 x = d[rand() % (r - l + 1) + l];
		l2 i = l, j = r;
		while(i <= j)
			{
				while(d[i] > x) i++;
				while(d[j] < x) j--;
				if(i <= j)
					{
						swap(d[i],d[j]);
						i++;
						j--;
					}
			}
	  	if(i < r) q_sort(i,r);
	  	if(j > l) q_sort(l,j);
	}

int main()
{
	unsigned l2 n,k,y,i,j,e = 0;
	cin >> n >> k;
	y = n;
	if(k == 1)
		{
			cout << n;
			return 0;
		}
	if((1 + k) / 2.0 * k > n || k >= 500000 || k >= n)
		{
			cout << -1;
			return 0;
		}
  	i = 2;
  	while(i * i <= n)
  		{
  			if(y % i == 0)
  				{
  					d.pb(i);
  					d.pb(n / i);
  					e += 2;
  				}
  		  	i++;
  		}
  	if(d.size() != 0)
  		{
  			q_sort(0,d.size() - 1);
         	for(i = 0; i < d.size(); i++)
         		{
         			if((n - d[i]) % d[i] == 0 && (d[i] + k * d[i]) * k / 2 <= n)
         				{
         					j = 1;
         					while(j < k)
         						{
         							printf("%d ", d[i] * j);
         							n -= d[i] * j;
         							j++;
         						}
         					cout << n;
         					return 0;
         				}
  				}
  		}
  	i = 1;
  	while(i < k)
  		{
  			printf("%d ", i);
  			n -= i;
  			i++;
  		}
  	cout << n;
}


//in the name of God
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include <map>
#include<vector>
#include <limits>
#include <iomanip>
#include <bits/stdc++.h>

using namespace std;

int a[200500];
int b[200500];

int main(){
    long long n,k,mx=0;
    cin>>n>>k;
    if(k>10000000){
        cout<<-1;
        return 0;
    }
    long long x=(k*(k+1))/2;
    if(x>n){
        cout<<-1;
        return 0;
    }
    for(long long i=1;i<=sqrt(n)+2;i++){
        if(n%i==0){
            if(i>=x)
                mx=max(mx,n/i);
            if((n/i)>=x) mx=max(mx,i);
        }
    }
    long long s=n;
    for(long long i=1;i<k;i++){
        cout<<i*mx<<" ";
        s-=i*mx;
    }
    cout<<s;
    return 0;
}


//in the name of God
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include <map>
#include<vector>
#include <limits>
#include <iomanip>
#include <bits/stdc++.h>

using namespace std;

int a[200500];
int b[200500];

int main(){
    long long n,k,mx=0;
    cin>>n>>k;
    if((k*(k+1))/2>n){
        cout<<-1;
        return 0;
    }
    long long x=(k*(k+1))/2;
    for(long long i=1;i<=sqrt(n)+2;i++){
        if(n%i==0){
            if(i>=x)
                mx=max(mx,n/i);
            if((n/i)>=x) mx=max(mx,i);
        }
    }
    int s=n;
    for(long long i=1;i<k;i++){
        cout<<i*mx<<" ";
        s-=i*mx;
    }
    cout<<s;
    return 0;
}


//in the name of God
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include <map>
#include<vector>
#include <limits>
#include <iomanip>
#include <bits/stdc++.h>

using namespace std;

int a[200500];
int b[200500];

int main(){
    long long n,k,mx=0;
    cin>>n>>k;
    if((k*(k+1))/2>n){
        cout<<-1;
        return 0;
    }
    long long x=(k*(k+1))/2;
    for(long long i=1;i<=sqrt(n)+2;i++){
        if(n%i==0){
            if(i>=x)
                mx=max(mx,n/i);
            if((n/i)>=x) mx=max(mx,i);
        }
    }
    long long s=n;
    for(long long i=1;i<k;i++){
        cout<<i*mx<<" ";
        s-=i*mx;
    }
    cout<<s;
    return 0;
}


//in the name of God
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include <map>
#include<vector>
#include <limits>
#include <iomanip>
#include <bits/stdc++.h>

using namespace std;

int a[200500];
int b[200500];

int main(){
    long long n,k,mx=0;
    cin>>n>>k;
    if(k>n){
        cout<<-1;
        return 0;
    }
    long long x=(k*(k+1))/2;
    if(x>10000000){
        cout<<-1;
        return 0;
    }
    for(long long i=1;i<=sqrt(n)+2;i++){
        if(n%i==0){
            if(i>=x)
                mx=max(mx,n/i);
            if((n/i)>=x) mx=max(mx,i);
        }
    }
    long long s=n;
    for(long long i=1;i<k;i++){
        cout<<i*mx<<" ";
        s-=i*mx;
    }
    cout<<s;
    return 0;
}


//in the name of God
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include <map>
#include<vector>
#include <limits>
#include <iomanip>
#include <bits/stdc++.h>

using namespace std;

int a[200500];
int b[200500];

int main(){
    long long n,k,mx=0;
    cin>>n>>k;
    if(k>n){
        cout<<-1;
        return 0;
    }
    long long x=(k*(k+1))/2;
    cout<<x<<endl;
    if(x>n){
        cout<<-1;
        return 0;
    }
    for(long long i=1;i<=sqrt(n)+2;i++){
        if(n%i==0){
            if(i>=x)
                mx=max(mx,n/i);
            if((n/i)>=x) mx=max(mx,i);
        }
    }
    long long s=n;
    for(long long i=1;i<k;i++){
        cout<<i*mx<<" ";
        s-=i*mx;
    }
    cout<<s;
    return 0;
}


//in the name of God
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include <map>
#include<vector>
#include <limits>
#include <iomanip>
#include <bits/stdc++.h>

using namespace std;

int a[200500];
int b[200500];

int main(){
    long long n,k,mx=0;
    cin>>n>>k;
    if((k*(k+1))/2>n){
        cout<<-1;
        return 0;
    }
    long long x=(k*(k+1))/2;
    for(long long i=1;i<=sqrt(n);i++){
        if(n%i==0){
            if(i>=x)
                mx=max(mx,n/i);
            else{
                if((n/i)>=x) mx=max(mx,i);
            }
        }
    }
    int s=n;
    for(long long i=1;i<k;i++){
        cout<<i*mx<<" ";
        s-=i*mx;
    }
    cout<<s;
    return 0;
}


//in the name of God
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include <map>
#include<vector>
#include <limits>
#include <iomanip>
#include <bits/stdc++.h>

using namespace std;

int a[200500];
int b[200500];

int main(){
    long long n,k,mx=0;
    cin>>n>>k;
    if((k*(k+1))/2>n){
        cout<<-1;
        return 0;
    }
    long long x=(k*(k+1))/2;
    for(long long i=1;i<=sqrt(n);i++){
        if(n%i==0){
            if(i>=x)
                mx=max(mx,n/i);
            else{
                if(n/i>=x) mx=max(mx,i);
            }
        }
    }
    int s=n;
    for(int i=1;i<k;i++){
        cout<<i*mx<<" ";
        s-=i*mx;
    }
    cout<<s;
    return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#define ll long long
#define rg register
using namespace std;
inline ll read(){
	rg ll x=0; rg char c=getchar();
	while(c<='0'||c>'9') c=getchar();
	while(c>'0'&&c<'9') x=(x<<1)+(x<<3)+c-'0',c=getchar();
	return x;
}
ll n,k,ans;
inline bool check(ll val){
	return (val*k*(k+1)>>1)<=n;
}
signed main(){
	n=read(); k=read();
	if(k>200000) return puts("-1")&0;
	for(rg ll i=1;i*i<=n;++i){
		if(n%i!=0) break;
		if(check(i)) ans=max(ans,i);
		if(check(n/i)) ans=max(ans,n/i);
	}
	for(rg ll i=1;i<k;++i) printf("%lld ",ans*i);
	return printf("%lld\n",n-((ans*k*(k-1))>>1))&0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#define ll long long
#define rg register
using namespace std;
inline ll read(){
	rg ll x=0; rg char c=getchar();
	while(c<='0'||c>'9') c=getchar();
	while(c>'0'&&c<'9') x=(x<<1)+(x<<3)+c-'0',c=getchar();
	return x;
}
ll n,k,ans;
inline bool check(ll val){
	return k*(k+1)>>1<=n/val;
}
signed main(){
	n=read(); k=read();
	if(k>200000) return puts("-1")&0;
	for(rg ll i=1;i*i<=n;++i){
		if(n%i!=0) continue;
		if(check(i)) ans=max(ans,i);
		if(check(n/i)) ans=max(ans,n/i);
	}
	if(ans==0) return puts("-1")&0;
	for(rg ll i=1;i<k;++i) printf("%lld ",ans*i);
	return printf("%lld\n",n-((ans*k*(k-1))>>1))&0;
}


#include <iostream>
#include <cstdio>

typedef long long LL;

LL n, k, ans;

int main() {
  scanf("%lld %lld", &n, &k);
  for (LL i = 1; i * i <= n; ++i) {
    if (n % i != 0) continue;
    if (i <= 2 * n / (1 + k) / k) ans = std::max(i, ans);
    if (n / i <= 2 * n / (1 + k) / k) ans = std::max(n / i, ans);
  }
  if (!ans) {
    puts("-1");
    return 0;
  }
  Ll sum = 0;
  for (int i = 1; i < k; ++i) {
    printf("%lld ", i * ans);
    sum += i * ans;
  }
  printf("%lld\n", n - sum);
  return 0;
}


#include<algorithm>
#include<stdio.h>
#define ll long long
#define rg register
using namespace std;
inline ll read(ll &T)
{
	T=0;char ssd=getchar();
	while(ssd<'0'||ssd>'9')ssd=getchar();
	while(ssd>='0'&&ssd<='9')T=(T<<3)+(T<<1)+(ssd-'0'),ssd=getchar();
}
int main()
{
	ll ans=0,n,k,left=1,right,k2;
	scanf("%lld %lld",&n,&k2);
	k=k2*(k2+1)/2,right=n+1;
	while(left<=right)
	{
		ll mid=(left+right)>>1;
		if(k*mid>n)right=mid-1;
		else left=mid+1,ans=mid;
	}
	if(ans==n+1||ans==0||n%ans!=0)puts("-1");
	else
	{
		for(ll u=1;u<k2;u+=1)printf("%lld ",u*ans);
		printf("%lld",ans*(n/ans-k+k2));
	}
	return 0;
}


#include<bits/stdc++.h>
#define re register
#define ll long long
using namespace std;
inline ll read(){
	ll sum=0;int k=1;
	char c=getchar();
	for(;c<'0' || c>'9';c=getchar()) if(c=='-') k=-1;
	for(;c>='0' && c<='9';c=getchar()) sum=sum*10+c-48;
	return sum*k;
}
ll n,k,qwq;
int fac[1000000],m;
inline void Get_ys(int p){
	for(re int i=1;i*i<=p;++i){
		if(p%i==0){
			fac[++m]=i;
			if(p!=p/i) fac[++m]=p/i;
		}
	}
}
bool vis[1000000],pd;
int a[1000000];
inline bool dfs(int now,int cs,int tot){
	if(cs==k+1 && tot==0){
		sort(a+1,a+cs);
		for(re int i=1;i<cs;++i) cout<<a[i]*qwq<<" ";
		pd=1;
		return 1;
	}
	for(re int i=1;i<=tot;++i){
		if(vis[i]==0){
			vis[i]=1;
			a[cs]=i;
			dfs(now+i,cs+1,tot-i);
			if(pd) return 1;
			vis[i]=0;
			a[cs]=0;
		}
	}
	return 0;
}
int main(){
	n=read();k=read();if(k==0) {
		cout<<-1;
		return 0;
	}
	Get_ys(n);
	sort(fac+1,fac+m+1);
	unsigned ll sum=k*(1+k)/2,qzh=0;
	for(re int i=m;i>0;--i){
		qzh=0;
		if(sum>n/fac[i]) continue;
		else {
			for(re int j=1;j<k;++j) {
				cout<<j*fac[i]<<" ";qzh=qzh+j;
			}
			cout<<(ll)((ll)fac[i]*(ll)((n/fac[i])-qzh));
			return 0;
		}
	}
	/*int nxt=n;
	for(;;){
		if(nxt==0) break;
		ll ys=0;
		for(re int i=nxt;i>=1;--i){
			if(n%i==0){
				ys=i;nxt=i-1;break;
			}
		}
		qwq=n/ys;
		//if(dfs(0,1,n/qwq)) return 0;
		ll sum=0,sd;
		for(re int j=1;j<k;++j) sum=sum+j;
		//cout<<qwq<<" "<<sum<<endl;
		sd=qwq-sum;
		if(sd<k) continue;
		else{
			for(re int j=1;j<k;++j) cout<<j*ys<<" ";
			cout<<(ll)(sd*ys);
			return 0;
		}
	}*/
	cout<<-1;
	return 0;
}


// luogu-judger-enable-o2
#include<bits/stdc++.h>
#include<cctype>
#pragma GCC optimize(2)

#define in(a) a = read()
#define out(a) write(a)
#define outn(a) out(a),putchar('\n')

#define ll long long
#define New ll

using namespace std;

namespace IO_Optimization
{

	inline New read()
	{
	    New X = 0,w = 0;
		char ch = 0;

		while(!isdigit(ch))
		{
			w |= ch == '-';
			ch=getchar();
		}
	    while(isdigit(ch))
		{
			X = (X << 3) + (X << 1) + (ch ^ 48);
			ch = getchar();
		}
	    return w ? -X : X;
	}

	inline void write(New x)
	{
	     if(x < 0) putchar('-'),x = -x;
	     if(x > 9) write(x/10);
	     putchar(x % 10 + '0');
	}
}
using namespace IO_Optimization;

New n,k,GCD,ans;

inline bool check(New now){
	return k * (k + 1) <= 2 * (n / now);
}

main(){
    in(n),in(k);

    for(int i = 1;i * i <= n; i++) {
        if(n % i != 0)
			continue;

		New dis = n / i;

        if(check(i)) {
        	if(GCD < i){
        		GCD = i;
			}
		}
        if(check(dis)) {
			if(GCD < dis){
				GCD = dis;
			}
		}
    }

    if(!GCD) {
    	puts("-1");
		exit(0);
	}

    for(int i = 1;i < k; i++){
    	out(i * GCD),putchar(' ');
    	ans += i * GCD;
	}

    out(n - ans);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n,k,tmp,sum,fac[5005];
int faccnt;
inline void factor(ll x)
{
	for(register ll i=sqrt(x);i;--i)
	{
		if(x%i) continue;
		fac[++faccnt]=i;
		fac[++faccnt]=x/i;
	}
}
int main()
{
	scanf("%lld%lld",&n,&k);
	tmp=k*(k+1)/2,sum=n;
	if(tmp>n)
	{
		puts("-1");
		return 0;
	}
	factor(n);
	sort(fac+1,fac+faccnt+1);
	n/=*lower_bound(fac+1,fac+faccnt+1,tmp);
	for(register int i=1;i<k;++i)
		printf("%lld ",1ll*i*n),sum-=1ll*i*n;
	printf("%lld\n",sum);
	return 0;
}


#include <cmath>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
ll Q = (1<<31) - 1;
int main()
{
	ll n,k;
	cin>>n>>k;
	ll num = (k+1) * k / 2;
	if(n<num||k>Q) cout<<"-1"<<endl;
	else
	{
		ll cnt = 1;
		ll i = sqrt(n);
		for(;i>=1;i--)
		{
			if(n%i==0)
			{
				ll m = n / i;
				if(m>=num) cnt = max(cnt,i);
				if(i>=num) cnt = max(cnt,m);
			}
		}
		ll ans = n / cnt;
		for(int i=1;i<k;i++)
		{
			cout<<i*cnt<<" ";
			ans-=i;
		}
		cout<<ans*cnt<<endl;
	}
 }


#include<bits/stdc++.h>
using namespace std;
#define re register
#define in inline
#define ll long long
#define get getchar()
in ll read()
{
	ll t=0; char ch=get;
	while(ch<'0' || ch>'9') ch=get;
	while(ch<='9' && ch>='0') t=t*10+ch-'0', ch=get;
	return t;
}
ll n,k,sq;

int main()
{
	n=read(),k=read();
	sq=sqrt(n);
	ll sum=(k+1)*k/2,last,ans;
    if(sum>n)
    {
        cout<<-1<<endl;
        return 0;
    }
	for( re ll i=1;i<=n;i++)
	{
        if(n/i<sum)break;
		if(n%i!=0)continue;
		ll kkk=n/i;
		if(kkk<sum)break;
		else last=k+kkk-sum,ans=i;
	}
	for(re ll i=1;i<k;i++)
	cout<<i*ans<<' ';
	cout<<last*ans<<endl;
}


#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
ll n, k;
bool flag = 0;
ll maxd;
int main()
{
	cin >> n >> k;
	if(k > 1e8)
	{
		printf("-1");
		return 0;
	}
	for(ll d = 1; d * d <= n; d++)
	{
		if(n % d != 0)
		{
			continue;
		}
		ll up = n / d;
		if(k * (k + 1) <= up * 2)
		{
			flag = 1;
			maxd = max(maxd, d);
		}
		up = n / (n / d);
		if(k * (k + 1) <= up * 2)
		{
			flag = 1;
			maxd = max(maxd, n / d);
		}
	}
	if(!flag)
	{
		printf("-1\n");
	}
	else
	{
		ll up = n / maxd;
		ll sum = 0;
		for(ll i = 1; i <= k-1; i++)
		{
			cout << i * maxd << " ";
			sum += i;
		}
		cout << (up - sum) * maxd << endl;
	}
	return 0;
}


#include <iostream>
#include <cstdio>

typedef long long LL;

LL n, k, ans;

int main() {
  scanf("%lld %lld", &n, &k);
  if (k > 2e5) {
    puts("-1");
    return 0;
  }
  for (LL i = 1; i * i <= n; ++i) {
    if (n % i != 0) continue;
    if ((1 + k) * k / 2 <= n / i) ans = std::max(i, ans);
    if ((1 + k) * k / 2 <= i) ans = std::max(n / i, ans);
  }
  if (!ans) {
    puts("-1");
    return 0;
  }
  int sum = 0;
  for (int i = 1; i < k; ++i) {
    printf("%lld ", i * ans);
    sum += i * ans;
  }
  printf("%lld\n", n - sum);
  return 0;
}


// luogu-judger-enable-o2
#include<bits/stdc++.h>
#include<cctype>
#pragma GCC optimize(2)

#define ll long long
#define New ll

using namespace std;

ll n,k;

int main()
{
	cin>>n>>k;
	New dis = k * (k + 1) / 2;
	New L = 0,R = n + 1;

	while(L + 1 < R){
		New mid = (L + R) / 2;
		if(dis * mid > n)R = mid;
		else L = mid;
	}

	New ans = L;

	if(ans == 0 || ans > n){
		puts("-1");
		exit(0);
	}

	for(New i = 1;i < k; i++){
		cout<<(ll)(i * ans)<<" ";
	}
	cout<<(ll)(ans * (n / ans - dis + k));
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n,k,tmp,tp,sum,fac[5005];
int faccnt;
inline bool check(ll x)
{
	return x<=(2*n/k)/(k+1);
}
int main()
{
	scanf("%lld%lld",&n,&k);
	sum=n;
	if(!check(1))
	{
		puts("-1");
		return 0;
	}
	for(register ll i=1;i*i<=n;++i)
	{
		if(n%i) continue;
		if(check(i)) tmp=max(tmp,i);
		if(check(n/i)) tmp=max(tmp,n/i);
	}
	for(int i=1;i<k;++i)
		printf("%lld ",1ll*i*tmp),sum-=i*tmp;
	printf("%lld\n",sum);
	return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    long long  n, k;
    cin >> n >> k;
    if ((1 + k) * k / 2 > n||k>1e6)    cout << -1 << endl;
    else {
        long long a = (1 + k) * k / 2;
        long long b;
        for (long long i = 1;i <= sqrt(n);i++) {
            if (n % i == 0 && i >= a) {
                b = n/i;break;
            }
            else if (n / i >=a)    b = i;
        }
        long long sum = 0;
        for (long long i = 1;i < k;i++) {
            cout << b * i << " ";
            sum += i;
        }
        cout << n-b*sum << endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n,k,tmp,tp,sum,fac[5005];
int faccnt;
inline bool check(ll x)
{
	return x*k*(k+1)/2<=n;
}
int main()
{
	scanf("%lld%lld",&n,&k);
	sum=n;
	if(!check(1))
	{
		puts("-1");
		return 0;
	}
	for(register ll i=1;i*i<=n;++i)
	{
		if(n%i) continue;
		if(check(i)) tmp=max(tmp,i);
		if(check(n/i)) tmp=max(tmp,n/i);
	}
	for(int i=1;i<k;++i)
		printf("%lld ",i*tmp),sum-=i*tmp;
	printf("%lld\n",sum);
	return 0;
}


#include<bits/stdc++.h>
#define re register
#define ll long long
using namespace std;
inline ll read(){
	ll sum=0;int k=1;
	char c=getchar();
	for(;c<'0' || c>'9';c=getchar()) if(c=='-') k=-1;
	for(;c>='0' && c<='9';c=getchar()) sum=sum*10+c-48;
	return sum*k;
}
ll n,k,qwq;
int fac[1000000],m;
inline void Get_ys(int p){
	for(re int i=1;i*i<=p;++i){
		if(p%i==0){
			fac[++m]=i;
			if(p!=p/i) fac[++m]=p/i;
		}
	}
}
bool vis[1000000],pd;
int a[1000000];
inline bool dfs(int now,int cs,int tot){
	if(cs==k+1 && tot==0){
		sort(a+1,a+cs);
		for(re int i=1;i<cs;++i) cout<<a[i]*qwq<<" ";
		pd=1;
		return 1;
	}
	for(re int i=1;i<=tot;++i){
		if(vis[i]==0){
			vis[i]=1;
			a[cs]=i;
			dfs(now+i,cs+1,tot-i);
			if(pd) return 1;
			vis[i]=0;
			a[cs]=0;
		}
	}
	return 0;
}
int main(){
	n=read();k=read();if(k==0) {
		cout<<-1;
		return 0;
	}
	if(k>150000){
		cout<<-1;
		return 0;
	}
	Get_ys(n);
	sort(fac+1,fac+m+1);
	unsigned ll sum=k*(1+k)/2,qzh=0;
	for(re int i=m;i>0;--i){
		qzh=0;
		if(sum>n/fac[i]) continue;
		else {
			for(re int j=1;j<k;++j) {
				cout<<j*fac[i]<<" ";qzh=qzh+j;
			}
			cout<<(ll)((ll)fac[i]*(ll)((n/fac[i])-qzh));
			return 0;
		}
	}
	/*int nxt=n;
	for(;;){
		if(nxt==0) break;
		ll ys=0;
		for(re int i=nxt;i>=1;--i){
			if(n%i==0){
				ys=i;nxt=i-1;break;
			}
		}
		qwq=n/ys;
		//if(dfs(0,1,n/qwq)) return 0;
		ll sum=0,sd;
		for(re int j=1;j<k;++j) sum=sum+j;
		//cout<<qwq<<" "<<sum<<endl;
		sd=qwq-sum;
		if(sd<k) continue;
		else{
			for(re int j=1;j<k;++j) cout<<j*ys<<" ";
			cout<<(ll)(sd*ys);
			return 0;
		}
	}*/
	cout<<-1;
	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#define ll long long
#define rg register
using namespace std;
inline ll read(){
	rg ll x=0; rg char c=getchar();
	while(c<='0'||c>'9') c=getchar();
	while(c>'0'&&c<'9') x=(x<<1)+(x<<3)+c-'0',c=getchar();
	return x;
}
ll n,k,l=1ll,r,mid,ans;
inline bool check(ll val){
	if((n%val)!=0) return 0;
	if((val*k*(k+1))>(n<<1)) return 0;
	return 1;
}
signed main(){
	n=read(); k=read(); r=n;
	if((k*(k+1))>(n<<1)) return puts("-1")&0;
	while(l<=r){
		mid=(l+r)>>1;
		if(check(mid)) ans=max(ans,mid),l=mid+1;
		else r=mid-1;
	}
	for(rg int i=1;i<k;++i) printf("%d ",ans*i);
	return printf("%d",n-((ans*k*(k-1))>>1))&0;
}


// luogu-judger-enable-o2
#include<bits/stdc++.h>
#include<cctype>
#pragma GCC optimize(2)

#define in(a) a = read()
#define out(a) write(a)
#define outn(a) out(a),putchar('\n')

#define ll long long
#define New ll

using namespace std;

namespace IO_Optimization
{

	inline New read()
	{
	    New X = 0,w = 0;
		char ch = 0;

		while(!isdigit(ch))
		{
			w |= ch == '-';
			ch=getchar();
		}
	    while(isdigit(ch))
		{
			X = (X << 3) + (X << 1) + (ch ^ 48);
			ch = getchar();
		}
	    return w ? -X : X;
	}

	inline void write(New x)
	{
	     if(x < 0) putchar('-'),x = -x;
	     if(x > 9) write(x / 10);
	     putchar(x % 10 + '0');
	}
}
using namespace IO_Optimization;

New n,k,GCD,ans;

inline bool check(New now){
	return k * (k + 1) / 2 <= (n / now);
}

main(){
    in(n),in(k);

    if(k > 2e9){
    	out(-1);
    	exit(0);
	}

    for(New i = 1;i * i <= n; i++) {
        if(n % i != 0)
			continue;

		New dis = n / i;

        if(check(i)) {
        	if(GCD < i){
        		GCD = i;
			}
		}
        if(check(dis)) {
			if(GCD < dis){
				GCD = dis;
			}
		}
    }

    if(!GCD) {
    	puts("-1");
		exit(0);
	}

    for(New i = 1;i < k; i++){
    	out(i * GCD),putchar(' ');
    	ans += i * GCD;
	}

    out(n - ans);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long

ll n,k;
ll s,q;

int main()
{
	scanf("%lld%lld",&n,&k);
	if(k>141420)
	{
		printf("-1");
		return 0;
	}
	s=(1+k)*k/2;
	for(ll i=1; i<=sqrt(n); i++)
		if(n%i==0)
		{
			if(i>=s)
			{
				q=n/i;
				break;
			}
			else if(n/i>=s)
				q=i;
		}
	if(!q)
	{
		printf("-1");
		return 0;
	}
	ll sum=0,i;
	for(ll i=1; i<k; i++)
	{
		cout<<i*q<<" ";
		sum+=i;
	}
	cout<<q*(n/q-sum);
	return 0;
}


// luogu-judger-enable-o2
#include <cstdio>
#include <iostream>
#include <math.h>
long long n,k,ans,tot;
using namespace std;
int main()
{
	scanf("%lld%lld",&n,&k);
	if((1+k)*k/2>n||k>(1<<5))
	{
		printf("-1");
		return 0;
	}
	long long m=sqrt(n);
	for(long long i=1;i<=m;i++)
	{
		if(n%i!=0) continue;
		if((1+k)*k/2<=n/i) ans=max(ans,i);
		if((1+k)*k/2<=n/(n/i)) ans=max(ans,n/i);
	}
	if(ans==0)
	{
		printf("-1");
		return 0;
	}
	for(long long i=1;i<k;i++)
	{
		printf("%lld ",i*ans);
		tot+=i*ans;
	}
	cout<<n-tot<<endl;
	return 0;
}


// luogu-judger-enable-o2
#include<bits/stdc++.h>
typedef long long LL;
using namespace std;
LL n,k;
LL ans;
int main()
{
	scanf("%lld%lld",&n,&k);
	if(k>=1e9 || k*(k+1)>2*n)
	{
		puts("-1"); return 0;
	}
	for(LL i=1;i*i<=n;++i)
		if(n%i==0)
		{
			if(k*(k+1)/2<=n/i) ans=max(ans,i);
			if(k*(k+1)/2<=i) ans=max(ans,n/i);
		}
	//cout<<ans<<endl;
	LL tmp=0;
	for(LL i=1;i<k;++i)
	{
		tmp+=i*ans;
		printf("%lld ",i*ans);
	}
	printf("%lld",n-tmp);
	return 0;
}


#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long ll;
inline ll max(int x,int y){return x>y?x:y;}
void write(ll x)
{
	if(x>9)write(x/10);
	putchar(x%10+48);
}
void print(ll x,int type=0)
{
	write(x);
	if(type==0)putchar(' ');
	if(type==1)putchar('\n');
}
ll n,sqt,k,gcd,ret;
int main()
{
	scanf("%lld%lld",&n,&k);
	if(k==1)return print(n,1),0;
	if(k>200000)return puts("-1")%1;
	ll s=k*(k+1)/2;
	sqt=sqrt(n);
	for(ll i=1;i<=sqt;i++)
	{
		if(n%i==0)
		{
			if(s<=n/i)gcd=max(gcd,i);
			if(s<=n/(n/i))gcd=max(gcd,n/i);
		}
	}
	if(gcd==0)return puts("-1")%1;
	for(int i=1;i<k;i++)
		print(i*gcd),ret+=i*gcd;
	print(n-ret,1);
	return 0;
}


#include<bits/stdc++.h>
#define int long long
#define Orzbby main
using namespace std;
int k,n,maxn,ans;
bool check(int x){
    return (1+k)*k/2<=(n/x);
}
Orzbby(){
    cin>>n>>k;
    if(k>2e5) puts("-1"),exit(0);
    for(int i=1;i*i<=n;i++){
        if(n%i!=0) continue;
        if(check(i)) maxn=max(maxn,i);
        if(check(n/i)) maxn=max(maxn,n/i);
    }
    if(!maxn) puts("-1"),exit(0);
    for(int i=1;i<=k-1;i++){
        cout<<i*maxn<<" ",ans+=i*maxn;
    }
    cout<<n-ans;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long i,n,k,gcd,ans;
main()
{
    scanf("%lld %lld",&n,&k);
    if(k>100000)
	{
		printf("-1");
		return 0;
	}
    for(i=1;i*i<=n;i++)
	{
        if(n%i!=0) continue;
        if((1+k)*k/2<=(n/i))gcd=max(gcd,i);
        if((1+k)*k/2<=(n/(n/i)))gcd=max(gcd,n/i);
    }
    if(!gcd)
	{
		printf("-1");
		return 0;
	}
    for(i=1;i<=k-1;i++)
    {
		printf("%lld ",i*gcd);
		ans+=i*gcd;
    }
	printf("%lld",n-ans);
    return 0;
}


#include <cstdio>
#include <iostream>
#include <math.h>
long long n,k,ans,tot;
using namespace std;
int main()
{
	scanf("%lld%lld",&n,&k);
	if(k>2e5)
	{
		printf("-1");
		return 0;
	}
	long long m=sqrt(n);
	for(long long i=1;i<=m;i++)
	{
		if(n%i!=0) continue;
		if((1+k)*k/2<=n/i) ans=max(ans,i);
		if((1+k)*k/2<=n/(n/i)) ans=max(ans,n/i);
	}
	if(ans==0)
	{
		printf("-1");
		return 0;
	}
	for(long long i=1;i<k;i++)
	{
		printf("%lld ",i*ans);
		tot+=i*ans;
	}
	cout<<n-tot<<endl;
	return 0;
}


#include<bits/stdc++.h>
#include<cctype>
#pragma GCC optimize(2)

#define in(a) a = read()
#define out(a) write(a)
#define outn(a) out(a),putchar('\n')

#define ll long long
#define New ll

using namespace std;

namespace IO_Optimization
{

	inline New read()
	{
	    New X = 0,w = 0;
		char ch = 0;

		while(!isdigit(ch))
		{
			w |= ch == '-';
			ch=getchar();
		}
	    while(isdigit(ch))
		{
			X = (X << 3) + (X << 1) + (ch ^ 48);
			ch = getchar();
		}
	    return w ? -X : X;
	}

	inline void write(New x)
	{
	     if(x < 0) putchar('-'),x = -x;
	     if(x > 9) write(x / 10);
	     putchar(x % 10 + '0');
	}
}
using namespace IO_Optimization;

New n,k,GCD,ans;

inline bool check(New now){
	return k * (k + 1) / 2 <= (n / now);
}

main(){
    in(n),in(k);

    if(k > 2e9){
    	out(-1);
    	exit(0);
	}

    for(New i = 1;i * i <= n; i++) {
        if(n % i != 0)
			continue;

		New dis = n / i;

        if(check(i)) {
        	if(GCD < i){
        		GCD = i;
			}
		}
        if(check(dis)) {
			if(GCD < dis){
				GCD = dis;
			}
		}
    }

    if(!GCD) {
    	puts("-1");
		exit(0);
	}

    for(New i = 1;i < k; i++){
    	out(i * GCD),putchar(' ');
    	ans += i * GCD;
	}

    out(n - ans);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
const int N=4*1e5+2;
const int MOD=1000000007;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main(){
     ull n , k ;
     cin>>n>>k;
     if(k*(k+1)/2>n){
         cout<<-1<<endl;
         return 0;
     }
     ull  l = 1, r = 1e15 ;
     ull ans = 1 ;
     auto can=[&](ll test){
         return test*k*(k+1)/2<=n;
     };
     while (l<=r) {
         ull mid = l + ((ll)r-(ll)l) / 2;
         if(can(mid)){
             ans=mid;
             l=mid+1;
         }else{
             r=mid-1;
         }
     }
     for(int i = 0 ;i < k-1 ; i++){
         ull num =(i+1)*ans;
         cout<<num<<" ";
         n-=num;
     }
     cout<<n<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main() {
    ull n, k;
    cin >> n >> k;
    if (n < k * (k + 1) / 2 || k >= 1e5 ) {
        return cout << -1, 0;
    }
    int lim = sqrt(n);
    vector<ll> vec;
    for (ll i = 1; i <= lim; i++) {
        if (n % i == 0) {
            vec.push_back(i);
            ll s = n / i;
            if (s != i) {
                vec.push_back(s);
            }
        }
    }
    ull m = k * (k + 1) / 2;
    ll ans = -1;
    for (ll num : vec) {
        if (n % num != 0)continue;
        if (n / num < m)continue;
        ans = max(ans,1ll*num);
    }
    if (ans == -1) {
        return cout << ans, 0;
    }
    int t = 1;
    for (int i = 0; i < k - 1; i++) {
        printf("%d ",ans*t);
        n -= ans * t;
        t++;
    }
    cout << n << endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N=4*1e5+2;
const int MOD=1000000007;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main(){
     ll n , k ;
     cin>>n>>k;
     if(k*(k+1)/2>n){
         cout<<-1<<endl;
     }
     ll l = 1, r = 1e10 ;
     int ans = 1 ;
     auto can=[&](ll test){
         return test*k*(k+1)/2<=n;
     };
     while (l<=r) {
         ll mid = l + (r-l )/ 2;
         if(can(mid)){
             ans=mid;
             l=mid+1;
         }else{
             r=mid-1;
         }
     }
     for(int i = 0 ;i < k-1 ; i++){
         ll num =(i+1)*ans;
         cout<<num<<" ";
         n-=num;
     }
     cout<<n<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main() {
    IO;
    ll n, k;
    cin >> n >> k;
    if (n < k * (k + 1) / 2) {
        return cout << -1, 0;
    }
    int lim = sqrt(n);
    vector<int> vec;
    for (int i = 1; i <= lim; i++) {
        if (n % i == 0) {
            vec.push_back(i);
            ll s = n / i;
            if (s != i) {
                vec.push_back(s);
            }
        }
    }
    ll m = k * (k + 1) / 2;
    ll ans = -1;
    for (int num : vec) {
        if (n % num != 0)continue;
        if (n / num < m)continue;
        ans = num;
    }
    if (ans == -1) {
        return cout << ans, 0;
    }
    int t = 1;
    for (int i = 0; i < k - 1; i++) {
        cout << ans * t << " ";
        n -= ans * t;
        t++;
    }
    cout << n << endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
const int N=4*1e5+2;
const int MOD=1000000007;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main(){
     ull n , k ;
     cin>>n>>k;
     if(k*(k+1)/2>n){
         cout<<-1<<endl;
         return 0;
     }
     ull  l = 1, r = 1e15 ;
     ull ans = 1 ;
     auto can=[&](ll test){
         return test*k*(k+1)/2<=n;
     };
     while (l<=r) {
         ull mid = l + ((ll)r-(ll)l / 2;
         if(can(mid)){
             ans=mid;
             l=mid+1;
         }else{
             r=mid-1;
         }
     }
     for(int i = 0 ;i < k-1 ; i++){
         ull num =(i+1)*ans;
         cout<<num<<" ";
         n-=num;
     }
     cout<<n<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main() {
    ull n, k;
    cin >> n >> k;
    if (n < k * (k + 1) / 2) {
        return cout << -1, 0;
    }
    int lim = sqrt(n);
    vector<int> vec;
    for (int i = 1; i <= lim; i++) {
        if (n % i == 0) {
            vec.push_back(i);
            ll s = n / i;
            if (s != i) {
                vec.push_back(s);
            }
        }
    }
    ll m = k * (k + 1) / 2;
    ll ans = -1;
    for (int num : vec) {
        if (n % num != 0)continue;
        if (n / num < m)continue;
        ans = max(ans,1ll*num);
    }
    if (ans == -1) {
        return cout << ans, 0;
    }
    int t = 1;
    for (int i = 0; i < k - 1; i++) {
        printf("%d ",ans*t);
        n -= ans * t;
        t++;
    }
    cout << n << endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N=4*1e5+2;
const int MOD=1000000007;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main(){
     ll n , k ;
     cin>>n>>k;
     if(k*(k+1)/2>n){
         cout<<-1<<endl;
         return 0;
     }
     ll l = 1, r = 1e4 ;
     int ans = 1 ;
     auto can=[&](ll test){
         return test*k*(k+1)/2<=n;
     };
     while (l<=r) {
         ll mid = l + (r-l )/ 2;
         if(can(mid)){
             ans=mid;
             l=mid+1;
         }else{
             r=mid-1;
         }
     }
     for(int i = 0 ;i < k-1 ; i++){
         ll num =(i+1)*ans;
         cout<<num<<" ";
         n-=num;
     }
     cout<<n<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N=4*1e5+2;
const int MOD=1000000007;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main(){
     ll n , k ;
     cin>>n>>k;
     if(k*(k+1)/2>n){
         cout<<-1<<endl;
         return 0;
     }
     ll l = 1, r = 1e10 ;
     int ans = 1 ;
     auto can=[&](ll test){
         return test*k*(k+1)/2<=n;
     };
     while (l<=r) {
         ll mid = l + (r-l )/ 2;
         if(can(mid)){
             ans=mid;
             l=mid+1;
         }else{
             r=mid-1;
         }
     }
     for(int i = 0 ;i < k-1 ; i++){
         ll num =(i+1)*ans;
         cout<<num<<" ";
         n-=num;
     }
     cout<<n<<endl;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main() {
    IO;
    ll n, k;
    cin >> n >> k;
    if (n < k * (k + 1) / 2) {
        return cout << -1, 0;
    }
    int lim = sqrt(n);
    vector<int> vec;
    for (int i = 1; i <= lim; i++) {
        if (n % i == 0) {
            vec.push_back(i);
            ll s = n / i;
            if (s != i) {
                vec.push_back(s);
            }
        }
    }
    ll m = k * (k + 1) / 2;
    ll ans = -1;
    for (int num : vec) {
        if (n % num != 0)continue;
        if (n / num < m)continue;
        ans = max(ans,1ll*num);
    }
    if (ans == -1) {
        return cout << ans, 0;
    }
    int t = 1;
    for (int i = 0; i < k - 1; i++) {
        cout << ans * t << " ";
        n -= ans * t;
        t++;
    }
    cout << n << endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main() {
    ull n, k;
    cin >> n >> k;
    if (n < k * (k + 1) / 2 || k >= 1e7 ) {
        return cout << -1, 0;
    }
    int lim = sqrt(n);
    vector<ll> vec;
    for (ll i = 1; i <= lim; i++) {
        if (n % i == 0) {
            vec.push_back(i);
            ll s = n / i;
            if (s != i) {
                vec.push_back(s);
            }
        }
    }
    ull m = k * (k + 1) / 2;
    ll ans = -1;
    for (ll num : vec) {
        if (n % num != 0)continue;
        if (n / num < m)continue;
        ans = max(ans,1ll*num);
    }
    if (ans == -1) {
        return cout << ans, 0;
    }
    int t = 1;
    for (int i = 0; i < k - 1; i++) {
        printf("%d ",ans*t);
        n -= ans * t;
        t++;
    }
    cout << n << endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main() {
    ll n, k;
    cin >> n >> k;
    if (n < k * (k + 1) / 2) {
        return cout << -1, 0;
    }
    int lim = sqrt(n);
    vector<int> vec;
    for (int i = 1; i <= lim; i++) {
        if (n % i == 0) {
            vec.push_back(i);
            ll s = n / i;
            if (s != i) {
                vec.push_back(s);
            }
        }
    }
    ll m = k * (k + 1) / 2;
    ll ans = -1;
    for (int num : vec) {
        if (n % num != 0)continue;
        if (n / num < m)continue;
        ans = max(ans,1ll*num);
    }
    if (ans == -1) {
        return cout << ans, 0;
    }
    int t = 1;
    for (int i = 0; i < k - 1; i++) {
        printf("%d ",ans*t);
        n -= ans * t;
        t++;
    }
    cout << n << endl;
    return 0;

}


#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
using namespace std;

typedef long long ll;
int gcd(int a,int b)
{
    if (b==0) return a;
    return (b,a%b);
}
int main()
{
    ll n,k;
    scanf ("%I64d%I64d",&n,&k);
    if (k>1000000 || k*(k+1)/2>n)
    {
        printf ("-1\n");
        return 0;
    }
    ll lim=sqrt(n),g=0,tmp=(1+k)*k/2;
	for(int i=1;i<=lim;++i) if(n%i==0)
	{
		if(n/i >= tmp){
			g=i;
		}
		if(i >= tmp) {
			g=n/i;break;
		}
	}
	ll cnt=0;
	for(int i=1;i<k;++i)
    printf("%I64d ",1ll*i*g),cnt+=i;
	printf("%I64d",1ll*(n/g-cnt)*g);
	return 0;

}


#include<cmath>
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
int main()
{
	ll n,k;
	cin>>n>>k;
	if(k>1000000||(1+k)*k/2 > n) {
        cout<<-1;
        return 0;
            }

	ll lim=sqrt(n),g=0,tmp=(1+k)*k/2;
	for(int i=1;i<=lim;++i) if(n%i==0)
	{
		if(n/i >= tmp){
			g=i;
		}
		if(i >= tmp) {
			g=n/i;break;
		}
	}

	ll cnt=0;
	for(int i=1;i<k;++i)
    printf("%I64d ",1ll*i*g),cnt+=i;
	printf("%I64d",1ll*(n/g-cnt)*g);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,k,i;
	scanf("%d%d",&n,&k);
	int a[k];
	float x;
	x=(2*n)/(k*k+k);
	if(x<1){
		printf("-1");
		return 0;
	}
	for(i=1;i<=k;i++) a[i-1]=i*(2*n)/(k*k+k);
	int sum=0;
	for(i=0;i<k;i++) sum+=a[i];
	sum=n-sum;
	int jump=1;
	if(k%2){
		a[k/2]++;
		sum--;
		while(sum){
			a[k/2-jump]++;
			sum--;
			if(sum) a[k/2+jump]++;
		}
	}
	else{
		while(sum){
			a[k/2-jump]++;
			sum--;
			if(sum) a[k/2-1+jump]++;
		}
	}
	for(i=0;i<k;i++) cout<<a[i]<<" ";
	cout<<endl;
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
using namespace std;

typedef long long ll;
int gcd(int a,int b)
{
    if (b==0) return a;
    return (b,a%b);
}
int main()
{
    ll n,k;
    scanf ("%I64d%I64d",&n,&k);
    if (k>1000000 || k*(k+1)/2>n)
    {
        printf ("-1\n");
        return 0;
    }
    ll lim=sqrt(n),g=0,tmp=(1+k)*k/2;
	for(int i=1;i<=lim;++i) if(n%i==0)
	{
		if(n/i >= tmp){
			g=i;
		}
		if(i >= tmp) {
			g=n/i;break;
		}
	}
	ll cnt=0;
	for(int i=1;i<k;++i)
    printf("%I64d ",                                                                                *i*g),cnt+=i;
	printf("%I64d",1ll*(n/g-cnt)*g);
	return 0;

}


#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,k,i;
	scanf("%d%d",&n,&k);
	int a[k];
	float x;
	x=(2*n)/(k*k+k);
	if(x<1){
		printf("-1\n");
		return 0;
	}
	if(k==1) printf("%d\n",n);
	for(i=1;i<=k;i++) a[i-1]=i*(2*n)/(k*k+k);
	int sum=0;
	for(i=0;i<k;i++) sum+=a[i];
	sum=n-sum;
	int jump=1;
	if(k%2){
		a[k/2]++;
		sum--;
		while(sum){
			a[k/2-jump]++;
			sum--;
			if(sum) a[k/2+jump]++;
		}
	}
	else{
		while(sum){
			a[k/2-jump]++;
			sum--;
			if(sum) a[k/2-1+jump]++;
		}
	}
	for(i=0;i<k;i++) printf("%d ",a[i]);
	printf("\n");
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define PRINT(x) cout << #x << " = " << x << endl;

void init() {
    cout.sync_with_stdio(false);
    cin.sync_with_stdio(false);
}

int main() {
    init();

    int n, k;
    cin >> n >> k;

    for (int d = sqrt(n); d >= 1; d--) {
        if (n % d != 0)
            continue;

        int s = d * k * (k - 1) / 2;
        //            PRINT(s);
        //            PRINT(d);
        if ((n - s) > (k - 1) * d && ((n - s) % d == 0)) {
            if (k != 1) {
                cout << d << " ";
                for (int i = 2; i < k; i++) {
                    cout << i * d << " ";
                }
            }
            cout << n - s;
            return 0;
        }
    }
    cout << -1;
}


#include <bits/stdc++.h>

using namespace std;

#define PRINT(x) cout << #x << " = " << x << endl;

void init() {
    cout.sync_with_stdio(false);
    cin.sync_with_stdio(false);
}

int main() {
    init();

    int n, k;
    cin >> n >> k;

    for (int d = 1; d <=n; d++) {
        if (n % d != 0)
            continue;

        int D = n / d;
        int s = D * k * (k - 1) / 2;
        PRINT(s);
        PRINT(D);
        if ((n - s) > (k - 1) * D && ((n - s) % D == 0)) {
            if (k != 1) {
                cout << D << " ";
                for (int i = 2; i < k; i++) {
                    cout << i * D << " ";
                }
            }
            cout << n - s;
            return 0;
        }
    }
    cout << -1;
}


#include <bits/stdc++.h>

using namespace std;

#define PRINT(x) cout << #x << " = " << x << endl;

void init() {
    cout.sync_with_stdio(false);
    cin.sync_with_stdio(false);
}

int main() {
    init();

    int n,k;
    while(cin >> n >> k) {

        for(int d=sqrt(n); d>=1; d--) {
            if(n%d != 0)
                break;
            int s = d * k * (k - 1) / 2;
            //PRINT(s);
            //PRINT(d);
            if((n-s) > (k-1)*d  && ((n-s)%d == 0) ) {
                cout << d << " ";
                for(int i=2; i<k; i++) {
                    cout << i*d << " ";
                }
                cout << n - s;
                goto test;
            }
        }
        cout << -1;
        test: ;
    }
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        if (max_soldier_height <= soldier_height) {
          if (max_soldier_index != 0 || max_soldier_height != soldier_height) {
            max_soldier_index = i;
          }
          max_soldier_height = soldier_height;
        }
        /*
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height     * (soldier_height > max_soldier_height);

        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                            i                 * (soldier_height > max_soldier_height);
        */
        if (min_soldier_height > soldier_height) {
          min_soldier_height = soldier_height;
          min_soldier_index = i;
        }
        /*
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height     * (soldier_height < min_soldier_height);

        min_soldier_index = min_soldier_index * (min_soldier_height < soldier_height) +
                            i                 * (soldier_height < min_soldier_height);
        */
    }

    std::cout << (n_soldiers - min_soldier_index + max_soldier_index - 1 - (min_soldier_index < max_soldier_index)) << std::endl;
    return 0;
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        if (max_soldier_height <= soldier_height) {
          if (max_soldier_height != soldier_height) {
            max_soldier_index = i;
          }
          max_soldier_height = soldier_height;
        }
        /*
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height     * (soldier_height > max_soldier_height);

        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                            i                 * (soldier_height > max_soldier_height);
        */
        if (min_soldier_height >= soldier_height) {
          min_soldier_height = soldier_height;
          min_soldier_index = i;
        }
        /*
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height     * (soldier_height < min_soldier_height);

        min_soldier_index = min_soldier_index * (min_soldier_height < soldier_height) +
                            i                 * (soldier_height < min_soldier_height);
        */
    }

    std::cout << (n_soldiers - min_soldier_index + max_soldier_index - 1 - (min_soldier_index < max_soldier_index)) << std::endl;
    return 0;
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        if (max_soldier_height < soldier_height) {
          max_soldier_height = soldier_height;
          max_soldier_index = i;
        }
        /*
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height     * (soldier_height > max_soldier_height);

        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                            i                 * (soldier_height > max_soldier_height);
        */
        if (min_soldier_height > soldier_height) {
          min_soldier_height = soldier_height;
          min_soldier_index = i;
        }
        /*
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height     * (soldier_height < min_soldier_height);

        min_soldier_index = min_soldier_index * (min_soldier_height < soldier_height) +
                            i                 * (soldier_height < min_soldier_height);
        */
    }

    std::cout << (n_soldiers - min_soldier_index + max_soldier_index - 1) << std::endl;
    return 0;
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height * (soldier_height > max_soldier_height);
        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                             i * (soldier_height > max_soldier_height);
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height * (soldier_height < min_soldier_height);
        min_soldier_index = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height * (soldier_height < min_soldier_height);
    }

    std::cout << n_soldiers - min_soldier_index + max_soldier_index - 1 << std::endl;
    return 0;
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        if (max_soldier_height <= soldier_height) {
          if (max_soldier_index != 0 || max_soldier_height != soldier_height) {
            max_soldier_index = i;
          }
          max_soldier_height = soldier_height;
        }
        /*
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height     * (soldier_height > max_soldier_height);

        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                            i                 * (soldier_height > max_soldier_height);
        */
        if (min_soldier_height >= soldier_height) {
          min_soldier_height = soldier_height;
          min_soldier_index = i;
        }
        /*
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height     * (soldier_height < min_soldier_height);

        min_soldier_index = min_soldier_index * (min_soldier_height < soldier_height) +
                            i                 * (soldier_height < min_soldier_height);
        */
    }

    std::cout << (n_soldiers - min_soldier_index + max_soldier_index - 1 - (min_soldier_index < max_soldier_index)) << std::endl;
    return 0;
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height * (soldier_height > max_soldier_height);
        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                             i * (soldier_height > max_soldier_height);
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height * (soldier_height < min_soldier_height);
        min_soldier_index = min_soldier_index * (min_soldier_height < soldier_height) +
                             i * (soldier_height < min_soldier_height);
    }

    std::cout << n_soldiers - min_soldier_index + max_soldier_index - 1 << std::endl;
    return 0;
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height * (soldier_height > max_soldier_height);
        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                             i * (soldier_height > max_soldier_height);
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height * (soldier_height < min_soldier_height);
        min_soldier_index = min_soldier_index * (min_soldier_height < soldier_height) +
                             i * (soldier_height < min_soldier_height);
    }

    std::cout << (n_soldiers - min_soldier_index + max_soldier_index - 1) << std::endl;
    return 0;
}


#include <iostream>

int main() {
    int n_soldiers;
    int max_soldier_height = 0;
    int max_soldier_index = 0;
    int min_soldier_height = 101;
    int min_soldier_index = 0;

    std::cin >> n_soldiers;

    int soldier_height;
    for (int i = 1; i <= n_soldiers; i++) {
        std::cin >> soldier_height;
        if (max_soldier_height <= soldier_height) {
          max_soldier_height = soldier_height;
          if (max_soldier_index != 0) {
            max_soldier_index = i;
          }
        }
        /*
        max_soldier_height = max_soldier_height * (max_soldier_height > soldier_height) +
                             soldier_height     * (soldier_height > max_soldier_height);

        max_soldier_index = max_soldier_index * (max_soldier_height > soldier_height) +
                            i                 * (soldier_height > max_soldier_height);
        */
        if (min_soldier_height > soldier_height) {
          min_soldier_height = soldier_height;
          if (min_soldier_index != n_soldiers) {
            min_soldier_index = i;
          }
        }
        /*
        min_soldier_height = min_soldier_height * (min_soldier_height < soldier_height) +
                             soldier_height     * (soldier_height < min_soldier_height);

        min_soldier_index = min_soldier_index * (min_soldier_height < soldier_height) +
                            i                 * (soldier_height < min_soldier_height);
        */
    }

    std::cout << (n_soldiers - min_soldier_index + max_soldier_index - 1 - (min_soldier_index < max_soldier_index)) << std::endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0,mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>=arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(n==2)
    {
        if(maxi>mini)
        {
            cout<<"0";
        }
        else
        {
        cout<<1;
        }
    }
    else{
    if(maxi>mini)
        {
            mini+=1;
        }
        cout<<maxi+(n-1)-mini;
    }

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n;
    cin>>n;
    int arr[n];
    int arr1[n];
    int mini=0;
    int maxi=0;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        cin>>arr1[i];
    }
    int b=101;
    int c=0;
    for(int j=0;j<n;j++)
    {
        if(b>arr[j])
        {
            b=arr[j];
            mini=j;
        }
        if(c<arr[j])
        {
            c=arr[j];
            maxi=j;
        }
    }
    if(maxi>mini)
    {
        mini++;
    }

        cout<<maxi+(n-1)+mini<<endl;
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0,mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>=arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(n==2)
    {
        cout<<"1";
    }
    else{
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;
    }

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n;
    cin>>n;
    int arr[n];
    int mini;
    int maxi;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    int min=101;
    int max=0;
    for(int j=0;j<n;j++)
    {
        if(arr[j]>max)
        {
            max=arr[j];
            maxi=j;
        }
        if(arr[j]<=mini)
        {
            min=arr[j];
            maxi=j;
        }
    }

        cout<<maxi+(n-1)-mini-1<<endl;
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0,mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n;
    cin>>n;
    int arr[n];
    int arr1[n];
    int mini;
    int maxi;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        cin>>arr1[i];
    }
    int min=101;
    int max=0;
    for(int j=0;j<n;j++)
    {
        if(arr[j]>max)
        {
            max=arr[j];
            maxi=j;
        }
        if(arr[j]<mini)
        {
            min=arr[j];
            maxi=j;
        }
    }
    if(maxi>mini)
    {
        mini++;
    }

        cout<<maxi+(n-1)-mini<<endl;
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0;mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>=arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(n==2)
    {
        cout<<"1";
    }
    else{
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;
    }

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0,mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>=arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(n==2)
    {
        if(maxi>mini)
        {
            cout<<1;
        }
        else
        {
        cout<<0;
        }
    }
    else{
    if(maxi>mini)
        {
            mini+=1;
        }
        cout<<maxi+(n-1)-mini;
    }

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n;
    cin>>n;
    int arr[n];
    int arr1[n];
    int mini=0;
    int maxi=0;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        cin>>arr1[i];
    }
    int b=101;
    int c=0;
    for(int j=0;j<n;j++)
    {
        if(b>arr[j])
        {
            b=arr[j];
        }
        if(c<arr[j])
        {
            c=arr[j]
        }
    }
    if(maxi>mini)
    {
        cout<<(maxi+(n-1)+mini)-1<<endl;
    }
    else
    {
        cout<<maxi+(n-1)+mini<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,max=0;min=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(min>arr[i])
        {
            min=arr[i];
            mini=i;
        }
        if(max<arr[i])
        {
            max=arr[i];
            maxi=i;
        }
    }
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,max=0;min=102;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(min>arr[i])
        {
            min=arr[i];
            mini=i;
        }
        if(max<arr[i])
        {
            max=arr[i];
            maxi=i;
        }
    }
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n;
    cin>>n;
    int arr[n];
    int arr1[n];
    int mini=0;
    int maxi=0;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        cin>>arr1[i];
    }
    sort(arr1,arr1+n);
    int b=arr1[0];
    int c=arr1[n-1];
    for(int j=0;j<n;j++)
    {
        if(b==arr[j])
        {
            mini++;
        }
        if(c==arr[j])
        {
            maxi++;
        }
    }
    if(maxi>mini)
    {
        cout<<(maxi+(n-1)+mini)-1<<endl;
    }
    else
    {
        cout<<maxi+(n-1)+mini<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0;mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n;
    cin>>n;
    int arr[n];
    int mini;
    int maxi;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    int min=101;
    int max=0;
    for(int j=0;j<n;j++)
    {
        if(arr[j]>max)
        {
            max=arr[j];
            maxi=j;
        }
        if(arr[j]<=mini)
        {
            min=arr[j];
            maxi=j;
        }
    }
    if(maxi>mini)
    {
        mini=mini+1;
    }

        cout<<maxi+(n-1)-mini-1<<endl;
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,max=0;min=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(min>=arr[i])
        {
            min=arr[i];
            mini=i;
        }
        if(max<arr[i])
        {
            max=arr[i];
            maxi=i;
        }
    }
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0,mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(n==2)
    {
        cout<<1;
    }
    else{
    if(maxi>mini)
        {
            mini+=2;
        }
        cout<<maxi+(n-1)-mini;
    }
}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n,maxi,mini,ma=0,mi=101;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }

    for(int i=0;i<n;i++)
    {
        if(mi>=arr[i])
        {
            mi=arr[i];
            mini=i;
        }
        if(ma<arr[i])
        {
            ma=arr[i];
            maxi=i;
        }
    }
    if(n==2)
    {
        cout<<"1";
    }
    else{
    if(maxi>mini)
        {
            mini+=1;
        }
        cout<<maxi+(n-1)-mini;
    }

}


#include<bits/stdc++.h>
using namespace std;

main()
{
    int n;
    cin>>n;
    int arr[n];
    int arr1[n];
    int mini=0;
    int maxi=0;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        cin>>arr1[i];
    }
    int b=101;
    int c=0;
    for(int j=0;j<n;j++)
    {
        if(b>=arr[j])
        {
            b=arr[j];
            mini=j;
        }
        if(c<arr[j])
        {
            c=arr[j];
            maxi=j;
        }
    }
    if(maxi>mini)
    {
        mini++;
    }

        cout<<maxi+(n-1)+mini<<endl;
}


#include <bits/stdc++.h>

#define inf 0x3f3f3f3f

#define INF 0x3f3f3f3f3f3f3f3fLL

#define MOD 1000000007

#define pb push_back

#define sq(x) ((x)*(x))

#define x first

#define y second

#define eps 1e-9

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define bit(x, y) (((x)>>(y))&1)

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzll(x))

#define bctz(x) (__builtin_ctz(x))

#define bctzl(x) (__builtin_ctzll(x))

#define SZ(x) ((x).size())

using namespace std;

typedef long long INT;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<pii, int> pi3;

typedef double DO;

template<typename T, typename U> inline void smin(T &a, const U &b) {if (a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, const U &b) {if (a<b) a=b;}

#define INPUT_LEN 1000

#define gets my_gets

char gchar() {static char tbuf1[INPUT_LEN],*tmp_st=tbuf1,*tmp_ed=tbuf1;if(tmp_st==tmp_ed){int len=fread(tbuf1,1,INPUT_LEN,stdin);if (len==0)return -1;tmp_ed=tbuf1+len;tmp_st=tbuf1;}return*(tmp_st++);}

inline bool gn(int &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(INT &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(char &x) {while(x=gchar(),x!=-1&&isspace(x));return x!=-1;}

inline bool gn(string &s){char c;s.clear();while(c=gchar(),c!=-1&&isspace(c));if(c!=-1)s+=c;while(c=gchar(),c!=-1&&!isspace(c))s+=c;return c!=-1;}

inline bool gn(DO &x) {string s;bool ok=gn(s);x=atof(s.c_str());return ok;}

inline bool gn(char *s) {string s1;bool ok=gn(s1);strcpy(s,s1.c_str());return ok;}

inline bool gets(char *s) {char c,t=0;while(c=gchar(),c!=-1&&c!='\n')*s++=c,t=1;*s=0;return c!=-1 || t;};

inline void print(int x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline void print(INT x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline bool print(char &x) {putchar(x);}

inline void print(DO &x){printf("%.10lf", x);}

inline void print(char *s){printf("%s", s);}

inline void print(string &s){printf("%s", s.c_str());}

template<class T,class T1>inline bool gn(T &x, T1 &y) {bool ok=gn(x); gn(y);return ok;}

template<class T,class T1,class T2>inline bool gn(T &x, T1 &y, T2 &z){bool ok=gn(x); gn(y); gn(z);return ok;}

template<class U,class V,class W,class X>inline bool gn(U &u, V &v, W &w, X &x){bool ok=gn(u,v);gn(w,x);return ok;}

template<class T>inline void printsp(T x) {print(x);putchar(' ');}

template<class T>inline void println(T x) {print(x);putchar('\n');}

template<class T,class U>inline void print(T x, U y){printsp(x);println(y);}

template<class T,class U,class V>inline void print(T x, U y, V z){printsp(x);print(y,z);}

template<class T,class U,class V,class W>inline void print(T x, U y, V z,W w){printsp(x);print(y, z, w);}

int power(int a, int b, int m, int ans=1) {

	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;

	return ans;

}

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	int n,d[1000];

	scanf("%d", &n);

	for(int i=0;i<n;i++){

		scanf("%d", &d[i]);

	}

	int p=n-1, q=0;

	for(int i=n-1;i>=0;i--){

		if(d[i]>=d[p])	p=i;

	}

	for(int i=0;i<n-1;i++){

		if(d[i]<=d[q])	q=i;

	}

	if((p+q)==n-1)	printf("%d", 0);

	if(p>q)		printf("%d", p+n-q-2);

	if(p<q)		printf("%d", p+n-q-1);

	return 0;

}


#include <bits/stdc++.h>

#define inf 0x3f3f3f3f

#define INF 0x3f3f3f3f3f3f3f3fLL

#define MOD 1000000007

#define pb push_back

#define sq(x) ((x)*(x))

#define x first

#define y second

#define eps 1e-9

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define bit(x, y) (((x)>>(y))&1)

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzll(x))

#define bctz(x) (__builtin_ctz(x))

#define bctzl(x) (__builtin_ctzll(x))

#define SZ(x) ((x).size())

using namespace std;

typedef long long INT;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<pii, int> pi3;

typedef double DO;

template<typename T, typename U> inline void smin(T &a, const U &b) {if (a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, const U &b) {if (a<b) a=b;}

#define INPUT_LEN 1000

#define gets my_gets

char gchar() {static char tbuf1[INPUT_LEN],*tmp_st=tbuf1,*tmp_ed=tbuf1;if(tmp_st==tmp_ed){int len=fread(tbuf1,1,INPUT_LEN,stdin);if (len==0)return -1;tmp_ed=tbuf1+len;tmp_st=tbuf1;}return*(tmp_st++);}

inline bool gn(int &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(INT &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(char &x) {while(x=gchar(),x!=-1&&isspace(x));return x!=-1;}

inline bool gn(string &s){char c;s.clear();while(c=gchar(),c!=-1&&isspace(c));if(c!=-1)s+=c;while(c=gchar(),c!=-1&&!isspace(c))s+=c;return c!=-1;}

inline bool gn(DO &x) {string s;bool ok=gn(s);x=atof(s.c_str());return ok;}

inline bool gn(char *s) {string s1;bool ok=gn(s1);strcpy(s,s1.c_str());return ok;}

inline bool gets(char *s) {char c,t=0;while(c=gchar(),c!=-1&&c!='\n')*s++=c,t=1;*s=0;return c!=-1 || t;};

inline void print(int x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline void print(INT x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline bool print(char &x) {putchar(x);}

inline void print(DO &x){printf("%.10lf", x);}

inline void print(char *s){printf("%s", s);}

inline void print(string &s){printf("%s", s.c_str());}

template<class T,class T1>inline bool gn(T &x, T1 &y) {bool ok=gn(x); gn(y);return ok;}

template<class T,class T1,class T2>inline bool gn(T &x, T1 &y, T2 &z){bool ok=gn(x); gn(y); gn(z);return ok;}

template<class U,class V,class W,class X>inline bool gn(U &u, V &v, W &w, X &x){bool ok=gn(u,v);gn(w,x);return ok;}

template<class T>inline void printsp(T x) {print(x);putchar(' ');}

template<class T>inline void println(T x) {print(x);putchar('\n');}

template<class T,class U>inline void print(T x, U y){printsp(x);println(y);}

template<class T,class U,class V>inline void print(T x, U y, V z){printsp(x);print(y,z);}

template<class T,class U,class V,class W>inline void print(T x, U y, V z,W w){printsp(x);print(y, z, w);}

int power(int a, int b, int m, int ans=1) {

	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;

	return ans;

}

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	int n,d[1000];

	scanf("%d", &n);

	for(int i=0;i<n;i++){

		scanf("%d", &d[i]);

	}

	int p=n-1, q=0;

	for(int i=n-1;i>=0;i--){

		if(d[i]>=d[p])	p=i;

	}

	for(int i=0;i<n-1;i++){

		if(d[i]<=d[q])	q=i;

	}

	if(p+q==n-1)	printf("%d", 0);

	if(p>q)		printf("%d", p+n-q-2);

	if(p<q)		printf("%d", p+n-q-1);

	return 0;

}


#include <bits/stdc++.h>

#define inf 0x3f3f3f3f

#define INF 0x3f3f3f3f3f3f3f3fLL

#define MOD 1000000007

#define pb push_back

#define sq(x) ((x)*(x))

#define x first

#define y second

#define eps 1e-9

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define bit(x, y) (((x)>>(y))&1)

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzll(x))

#define bctz(x) (__builtin_ctz(x))

#define bctzl(x) (__builtin_ctzll(x))

#define SZ(x) ((x).size())

using namespace std;

typedef long long INT;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<pii, int> pi3;

typedef double DO;

template<typename T, typename U> inline void smin(T &a, const U &b) {if (a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, const U &b) {if (a<b) a=b;}

#define INPUT_LEN 1000

#define gets my_gets

char gchar() {static char tbuf1[INPUT_LEN],*tmp_st=tbuf1,*tmp_ed=tbuf1;if(tmp_st==tmp_ed){int len=fread(tbuf1,1,INPUT_LEN,stdin);if (len==0)return -1;tmp_ed=tbuf1+len;tmp_st=tbuf1;}return*(tmp_st++);}

inline bool gn(int &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(INT &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(char &x) {while(x=gchar(),x!=-1&&isspace(x));return x!=-1;}

inline bool gn(string &s){char c;s.clear();while(c=gchar(),c!=-1&&isspace(c));if(c!=-1)s+=c;while(c=gchar(),c!=-1&&!isspace(c))s+=c;return c!=-1;}

inline bool gn(DO &x) {string s;bool ok=gn(s);x=atof(s.c_str());return ok;}

inline bool gn(char *s) {string s1;bool ok=gn(s1);strcpy(s,s1.c_str());return ok;}

inline bool gets(char *s) {char c,t=0;while(c=gchar(),c!=-1&&c!='\n')*s++=c,t=1;*s=0;return c!=-1 || t;};

inline void print(int x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline void print(INT x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline bool print(char &x) {putchar(x);}

inline void print(DO &x){printf("%.10lf", x);}

inline void print(char *s){printf("%s", s);}

inline void print(string &s){printf("%s", s.c_str());}

template<class T,class T1>inline bool gn(T &x, T1 &y) {bool ok=gn(x); gn(y);return ok;}

template<class T,class T1,class T2>inline bool gn(T &x, T1 &y, T2 &z){bool ok=gn(x); gn(y); gn(z);return ok;}

template<class U,class V,class W,class X>inline bool gn(U &u, V &v, W &w, X &x){bool ok=gn(u,v);gn(w,x);return ok;}

template<class T>inline void printsp(T x) {print(x);putchar(' ');}

template<class T>inline void println(T x) {print(x);putchar('\n');}

template<class T,class U>inline void print(T x, U y){printsp(x);println(y);}

template<class T,class U,class V>inline void print(T x, U y, V z){printsp(x);print(y,z);}

template<class T,class U,class V,class W>inline void print(T x, U y, V z,W w){printsp(x);print(y, z, w);}

int power(int a, int b, int m, int ans=1) {

	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;

	return ans;

}

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	int n,d[1000];

	scanf("%d", &n);

	for(int i=0;i<n;i++){

		scanf("%d", &d[i]);

	}

	int p=n-1, q=0;

	for(int i=n-1;i>=0;i--){

		if(d[i]>=d[p])	p=i;

	}

	for(int i=0;i<n-1;i++){

		if(d[i]<=d[q])	q=i;

	}

	if(p+q==n-1)	printf("%d\n", 0);

	if(p>q)		printf("%d\n", p+n-q-2);

	if(p<q)		printf("%d\n", p+n-q-1);

	return 0;

}


#include <bits/stdc++.h>

#define inf 0x3f3f3f3f

#define INF 0x3f3f3f3f3f3f3f3fLL

#define MOD 1000000007

#define pb push_back

#define sq(x) ((x)*(x))

#define x first

#define y second

#define eps 1e-9

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define bit(x, y) (((x)>>(y))&1)

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzll(x))

#define bctz(x) (__builtin_ctz(x))

#define bctzl(x) (__builtin_ctzll(x))

#define SZ(x) ((x).size())

using namespace std;

typedef long long INT;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<pii, int> pi3;

typedef double DO;

template<typename T, typename U> inline void smin(T &a, const U &b) {if (a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, const U &b) {if (a<b) a=b;}

#define INPUT_LEN 1000

#define gets my_gets

char gchar() {static char tbuf1[INPUT_LEN],*tmp_st=tbuf1,*tmp_ed=tbuf1;if(tmp_st==tmp_ed){int len=fread(tbuf1,1,INPUT_LEN,stdin);if (len==0)return -1;tmp_ed=tbuf1+len;tmp_st=tbuf1;}return*(tmp_st++);}

inline bool gn(int &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(INT &x) {char c, sg=0;while (c=gchar(),(c>'9'||c<'0')&&c!='-'&&c!=-1);if (c==-1) return 0;for((c=='-'?sg=1,c=gchar():0),x=0;c>='0'&&c<='9';c=gchar())x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;return 1;}

inline bool gn(char &x) {while(x=gchar(),x!=-1&&isspace(x));return x!=-1;}

inline bool gn(string &s){char c;s.clear();while(c=gchar(),c!=-1&&isspace(c));if(c!=-1)s+=c;while(c=gchar(),c!=-1&&!isspace(c))s+=c;return c!=-1;}

inline bool gn(DO &x) {string s;bool ok=gn(s);x=atof(s.c_str());return ok;}

inline bool gn(char *s) {string s1;bool ok=gn(s1);strcpy(s,s1.c_str());return ok;}

inline bool gets(char *s) {char c,t=0;while(c=gchar(),c!=-1&&c!='\n')*s++=c,t=1;*s=0;return c!=-1 || t;};

inline void print(int x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline void print(INT x) {if(x<0){putchar('-');return print(-x);}if(x<10){putchar('0'+x);return;}print(x/10);putchar(x%10+'0');}

inline bool print(char &x) {putchar(x);}

inline void print(DO &x){printf("%.10lf", x);}

inline void print(char *s){printf("%s", s);}

inline void print(string &s){printf("%s", s.c_str());}

template<class T,class T1>inline bool gn(T &x, T1 &y) {bool ok=gn(x); gn(y);return ok;}

template<class T,class T1,class T2>inline bool gn(T &x, T1 &y, T2 &z){bool ok=gn(x); gn(y); gn(z);return ok;}

template<class U,class V,class W,class X>inline bool gn(U &u, V &v, W &w, X &x){bool ok=gn(u,v);gn(w,x);return ok;}

template<class T>inline void printsp(T x) {print(x);putchar(' ');}

template<class T>inline void println(T x) {print(x);putchar('\n');}

template<class T,class U>inline void print(T x, U y){printsp(x);println(y);}

template<class T,class U,class V>inline void print(T x, U y, V z){printsp(x);print(y,z);}

template<class T,class U,class V,class W>inline void print(T x, U y, V z,W w){printsp(x);print(y, z, w);}

int power(int a, int b, int m, int ans=1) {

	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;

	return ans;

}

int n,d[1000];

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	scanf("%d", &n);

	for(int i=0;i<n;i++){

		scanf("%d", &d[i]);

	}

	int p=n-1, q=0;

	for(int i=n-1;i>=0;i--){

		if(d[i]>=d[p])	p=i;

	}

	for(int i=0;i<n;i++){

		if(d[i]<=d[q])	q=i;

	}

	if(p+q==n-1)	printf("%d\n", 0);

	if(p>q)		printf("%d\n", p+n-q-2);

	if(p<q)		printf("%d\n", p+n-q-1);

	return 0;

}