#include <iostream>
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 n,a,b,x,d,d1,b2;
	cin>>n>>a;
	if(n==a*3){
		b=n/3;
		cout<<b<<" "<<"0"<<endl<<b<<" "<<"0"<<endl<<b<<" "<<"0";
	}
	if(n<a or n==a or n<a*3){
		cout<<"-1";
	}
	if(n>a*3){
		if(n%2==0){
			x=n-a*2;
			d=x/2+1;
			d1=x/2-1;
				cout<<a<<" "<<"0"<<endl<<a<<" "<<"0"<<endl<<d<<" "<<d1;
		}
		else{
			x=n-a*2-1;
			d=x/2+1;
			d1=x/2-1;
				cout<<a<<" "<<"0"<<endl<<a<<" "<<"1"<<endl<<d<<" "<<d1;
		}
	
	}
	
	return 0;
}