#include <stdio.h>

int main(){
  long n,a,ost,p,d;
  scanf("%ld%ld",&n,&a);
  ost=n-2*a;
  if (n<3*a) printf("%d",-1);
  else if(ost<2*a-2)
  {
    printf("%d %ld\n",0,a);
    printf("%d %ld\n",0,a);
    printf("%d %ld\n",0,ost);
  } 
  else if (ost%2==0){
    p=(ost/2)-1;
    d=(ost/2)+1;
    printf("%d %ld\n",0,a);
    printf("%d %ld\n",0,a);
    printf("%ld %ld\n",p,d);
  }
  else {
    p=(ost/2)-1;
    d=(ost/2)+1;
    printf("%d %ld\n",0,a);
    printf("%d %ld\n",1,a);
    printf("%ld %ld\n",p,d);
  }
}