#include <bits/stdc++.h>
using namespace std;
int ucitaj()
{
	int rez=0;
	char ch;
	while (true)
	{
		ch=getchar();
		if (ch<'0' or ch>'9') break;
		rez=rez*10+(ch-'0');
	}
	return rez;
}
int main()
{
	int N,A,s;
	N=ucitaj();
	A=ucitaj();
	if ((N<3*A) or ((A==2) and (N % 2 != 0)))
	{
		printf("-1");
	}
	else
	{
		printf("%d",A);
		printf("0\n");
		printf("%d",A);
		s=N-2*A;
		if (s%2!=0)
		{
			printf("1\n");
			s--;
		}
		else
		{
			printf("0\n");
		}
		if (s/2+1<A)
		{
			printf("%d",A);
			printf("%d",s-A);
		}
		else
		{
			printf("%d",s/2+1);
			printf("%d",s/2-1);
		}
	}
}