#include<stdio.h>
#include<stdlib.h>
#include<math.h>
struct Mec{
	unsigned long a,b;
};

main(){
	unsigned long a,n; Mec d[5]; int i=0; //n - ukupan broj poena
	scanf("%lu %lu",&n,&a);		// a - broj poena potreban za jedan set
	if(n<3*a)printf("-1");
	else{
		while(i<4){
			d[i].a=a;
			d[i].b=0;
			n-=a;
			printf("%lu %lu\n",d[i].a,d[i].b,n);
			i++;
		
		}
	d[i].a=(n-2)/2+2;
	d[i].b=d[i].a-2;
	printf("%lu %lu",d[i].a,d[i].b);
	}
	
}