#include <stdio.h>
#include <stdlib.h>

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