#include <bits/stdc++.h>

#define endl "\n"

using namespace std;

int main()
{
    ios::sync_with_stdio(false); cin.tie(0);

    long n,a; cin >> n >> a;
    if(n<3*a) {
        cout << "-1" << endl;
        return 0;
    }

    cout << a << " 0" << endl;
    n-=a;

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

    return 0;
}