#include<iostream>
using namespace std;
int main()
{
	int b=0,c,a,n;
	cin>>n>>a;
	if(n<3*a)
	{
		cout<<-1;
		return 0;
	}
	cout<<a<<" "<<0<<endl;
	n=n-2*a;
		cout<<a<<" ";
	if(n%2==1)
	{
		cout<<1<<endl;
		n=n-1;
	}
	else
	{
		cout<<0<<endl;
		
	}
	if(n<2*a)
	{
		cout<<a<<" "<<n-a;
	}
	else
	{
		n=n-2;
		cout<<(n/2)+2<<" "<<n/2;
	}
}