#include <iostream>

using namespace std;

int main()
{
    unsigned long int n;
    unsigned long int a;
    int p=0;
    cin>>n;
    cin>>a;
    if(a==2 && n%2==1)
    {

        cout<<"-1";
    }
    else
    {


        if(n<3*a)
        {

            cout<<"-1";
        }
        else
        {
            cout << a<<" 0"<< endl;
            n-=a;
            if((n)%2==0){
            if(((n)%a)%2==1)
            {
                cout<<a<<" 1"<<endl;
                p=1;
            }
            else
            {
                cout<<a<<" 0"<<endl;
            }
            }
            else
            {
              if(((n)%a)%2==0)
            {
                cout<<a<<" 0"<<endl;
            }
            else
            {
                cout<<a<<" 1"<<endl;
                p=1;
            }
            }
            n=n-a-p;
            if(n<2*a-2)
            {


            cout<<a<<" "<<(n-a)<<endl;
        }
        else
            {

                cout<<(n/2)+1<<" "<<(n/2)-1<<endl;
            }
        }
    }
    return 0;
}