using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
	class Program
	{
		static void Main(string[] args)
		{
			string[] unos = Console.ReadLine().Split();
			int ukupno = int.Parse(unos[0]);
			int set = int.Parse(unos[1]);

			if (ukupno < set * 3)
			{
				Console.WriteLine(-1);
				return;
			}


			int iskorisceno = 0;
			
			//25 0
			Console.WriteLine("{0} {1}", set, 0);
			iskorisceno += set;

			if (ukupno % 2 == 0)
			{
				//25 0
				Console.WriteLine("{0} {1}", set, 0);
				iskorisceno += set;
			}
			else
			{
				//25 1
				Console.WriteLine("{0} {1}", set, 1);
				iskorisceno += set + 1;
			}
			int mid = (ukupno - iskorisceno) / 2;
			Console.WriteLine("{0} {1}", mid + 1, mid - 1);
			 
		}
	}
}