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

	}
	
}