#include <iostream>

using namespace std;

int main()
{
    int n, a;
    cin>>n>>a;
    if (3*a>n)
        cout<<-1;
    else if (6*a-6>n)
    {
        int p=(n-3*a)/3;
        cout<<a<<" "<<p<<endl;
        cout<<a<<" "<<p<<endl;
        cout<<a<<" "<<n-(3*a+2*p)<<endl;
    }
}