#include <bits/stdc++.h>
using namespace std;

#define ra " "

int main()
{
    long n,a;
    cin>>n>>a;
    if(n<3*a) { cout<<-1; return 0; }
    if(n-2*a<=2*a-2) {
        cout<<a<<ra<<0<<endl<<a<<ra<<0<<endl<<a<<ra<<n-3*a; return 0;
    }
    long x=n/2-a+1;
    long y=n-(x+x-2)-2*a;
    cout<<x<<ra<<x-2<<endl;
    cout<<a<<ra<<min(a-2,y)<<endl; y-=min(a-2,y);
    cout<<a<<ra<<min(a-2,y);
    return 0;
}