#include <iostream>
using namespace std;
int main(int argc, char** argv) {
	long long int N;
	long long int A;
	int fail=-1;
	cin>>N;
	cin>>A;
    if(N<(3*A)){
    	cout<<fail;
	} else {
	if((N-2*A)%2==0){
	cout<<A<<" ";
	N-=A;
	cout<<0; 
	cout<<endl;
	cout<<A<<" ";
	N-=A;
	cout<<0;
	cout<<endl;
	if(N>(A*2)+1){
		if(N%2==0){
		cout<<((N/2)+1)<<" ";
		cout<<((N/2)-1);
		}
		} else {
		cout<<A<<" ";;
		cout<<N-A;
	}
} else {
	cout<<A<<" ";
	N-=A;
	cout<<0; 
	cout<<endl;
	cout<<A<<" ";
	N-=A+1;
	cout<<1;
	cout<<endl;
	if(N>(A*2)+1){
		if(N%2==0){
		cout<<((N/2)+1)<<" ";
		cout<<((N/2)-1);
		}
		} else {
		cout<<A<<" ";;
		cout<<N-A;
	}
}
	
	return 0;
}
}