#include <iostream>
using namespace std;

int main(int argc, char** argv) {
	long long n,a;
	cin>>n>>a;
	if (n<a*3) cout<<-1;
	else{
		n-=2*a;
		cout<<a<<" 0\n";
		if(n%2==1){
			cout<<a<<" 1\n";
			n--;
		}
			
		else
			cout<<a<<" 0\n";
		cout<<n/2+1<<" "<<n/2-1;
	}
	return 0;
}