#include <bits/stdc++.h>

using namespace std;

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