#include <iostream>
#include <stdlib.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	int a,n,max,puta,b,c,i,min,zbir;
	cin>>n>>a;
	max=(a+a-2);
	min=a*3;
	b=a-2;
	if(a==n || a*3>n )
	{
		cout<<"-1";
	}
	else
	{
		c=n/3;
	
	zbir=c+c;
	for(i=0;i<2;i++)
	{

		cout<<c<<endl;
		cout<<0<<endl;
	}
	cout<<n-zbir<<endl;
	cout<<0<<endl;
}
	
	return 0;
}