#include <cstdio>
#include <set>
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstring>
#include <ctime>
using namespace std;
#define NAME "partition"

int main() {
	freopen(NAME".in", "r", stdin);
	freopen(NAME".out", "w", stdout);
	int n, k;
	cin >> n >> k;
	if (n % 2 || k == 1 || n < k) cout << "-1";
	else if (k % 2 == 0) {
	    int x = (n - k + 2) / 2;
	    for (int i = 1; i <= k - 2; ++i)
            printf("1 ");
        cout << x << " " << x << endl;
	} else if (k == 3) {
	    for (int i = 2; i <= n; i += 2) {
	        int r = n - i;
	        int x = 0;
	        int y = 0;
	        for (int j = 17; j >= 0; --j)
                if ((i>>j)&1) {
                    x += 1<<j;
                    r -= 1<<j;
                } else if (1<<j+1 <= r) {
                    r -= 1<<j+1;
                    x += 1<<j;
                    y += 1<<j;
                }
            if (r == 0 && x && y) {
                cout << i << " " << x << " " << y << endl;
                return 0;
            }
	    }
	    cout << -1;
	} else {
	    cout << "1 2 3 ";
	    k -= 3;
	    n -= 6;
	    for (int i = 1; i <= k - 2; ++i)
            printf("1 ");
        cout << (n - k + 2) / 2 << " " << (n - k + 2) / 2 << endl;
	}
    return 0;
}
