#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,a;
    cin>>n>>a;
    if(a==2 && n%2==1){
        cout<<-1;
        return 0;
    }
    if(3*a>n){
        cout<<-1;
        return 0;
    }else{
        n-=2*a;
        int ost=n%2;
        n-=2;
        cout<<n/2<<" "<<n/2+2<<endl;
        cout<<ost<<" "<<a<<endl;
        cout<<0<<" "<<a<<endl;
    }
    return 0;
}