#include <stdio.h>

int main()
{
    long n,a,k,b,c;
    scanf("%li %li",&n,&a);
    if(n>=3*a){
        if(n & 1){
            n=n-2*a-1;
            printf("%li 0  \n",a);
            printf("%li 1  \n",a);
            if(n<=(2*a-2)){
                k=n-a;
                printf("%li %li",a,k);
            }else{
               b=n/2+1;
               c=n/2-1;
               printf("%li %li",b,c); 
            }
            
            
        }else{
            printf("%li 0  \n",a);
            printf("%li 0  \n",a);
            n=n-2*a;
            if(n<=(2*a-2)){
                k=n-a;
                printf("%li %li",a,k);
            }else{
               b=n/2+1;
               c=n/2-1;
               printf("%li %li",b,c); 
            }
            
        }
        
    }else printf("-1");
    
    return 0;
}