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

int main() {
    ios_base::sync_with_stdio(false);

    int n, a;
    cin >> n >> a;

    if (n - 2 * a < 0 || n - 2 * a < a) {
        cout << "-1";
        return 0;
    }

    cout << "0" << ' ' << a << "\n";
    cout << "0" << ' ' << a << "\n";
    cout << "0" << ' ' << (n - 2 * a) << "\n";

    return 0;
}