#include <bits/stdc++.h>

using namespace std;

long long n,a;

int main(){

    scanf("%lld %lld", &n, &a);

    if(n%3 == 0 and a*3 == n){
        printf("%lld 0\n%lld 0\n%lld 0\n", a,a,a);
        return 0;
    }
    else{
        printf("-1\n");
    }



 return 0;
}