#include <stdio.h>

int main(void) {
  long int n,a;
  scanf("%ld",&n);
  scanf("%ld",&a);

  if(n<a*3){
    printf("\n-1");
  }
  else if(a==2){
    if(n%2==1){
      printf("-1");
    }
    else{
      printf("\n%ld 0",a);
      printf("\n%ld 0",a);
      n-=2*a;
      printf("\n%ld %ld",n/2+1,n/2-1);
    }
  }
  else{
    printf("\n%ld 0",a);
    if(n%2){
      printf("\n%ld 1",a);
      n--;
    }
    else
      printf("\n%ld 0",a);
    n-=2*a;
    printf("\n%ld %ld",n/2+1,n/2-1);
  }
  return 0;
}