using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] values = s.Split(' ');
            int N = int.Parse(values[0]);
            int A = int.Parse(values[1]);
            if(N<=3*A)
            {
                Console.WriteLine("-1");
            }
            else
            {
                Console.WriteLine(A + " 0");
                N = N - A;
                if(N%2==0)
                {
                    Console.WriteLine(A + " 0");
                }
                else
                {
                    Console.WriteLine(A + " 1");
                }
                N = N - A - 1;
                N = N / 2;
                Console.WriteLine((N + 1) + " " + (N - 1));
            }
            
        }
    }
}