#include <iostream>

using namespace std;

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

    return 0;
}