#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int poeni,granica,s;
    scanf("%lld%lld",&poeni,&granica);
    if(poeni<3*granica) {printf("-1"); return 0;}
    printf("%lld 0\n",granica);
    s=poeni-2*granica;
    printf("%lld %lld\n",granica,s%2);
    if(s%2) s=(s+s%2)/2;
    else s=(s+2)/2;
    printf("%lld %lld",s,s-2);

    return 0;
}