#include <iostream>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cerr.tie(0);
    int a,n;
    cin>>n>>a;
    if(n<3*a)cout<<-1;
    else{
        cout<<0<<" "<<a<<"\n";
        cout<<(n-2*a)%2<<" "<<a<<"\n";
        cout<<(n-2*a)/2-1<<" "<<(n-2*a)/2+1;
    }
}