#include <bits/stdc++.h>
#define ll long long
using namespace std;

ll n, a, temp;

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