#include <iostream>

using namespace std;

int main()
{
    long long int a;
    long long int b;
    long long int c;
    long long int d;

    cin >> a >> b;

    if (a <= b)
    {
        cout << -1;
        return 0;
    }

    c = a - b*2;
    a = c/2;

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


    return 0;
}