#include<stdio.h>
#define ll long long
main()
{
	ll n,a;
	scanf("%lld%lld",&n,&a);
	if(n<3*a) printf("-1");
	else if(n==3*a) printf("%lld 0\n%lld 0\n%lld 0",a,a,a);
	else if(n<4*a-2) printf("%lld 0\n%lld 0\n%lld %lld",a,a,a,n-3*a);
	else if((n-2*a)%2) printf("%lld 0\n%lld 1\n%lld %lld",a,a,(n-2*a-1)/2+1,(n-2*a-1)/2-1);
	else printf("%lld 0\n%lld 0\n%lld %lld",a,a,(n-2*a)/2+1,(n-2*a)/2-1);
}