using System;
class zad2{
    static void Main()
    {
        int n,a,f,g,h;
        string s = Console.ReadLine();
        string[] t = s.Split(' ');
        n=int.Parse(t[0]);
        a=int.Parse(t[1]);
        if(n<a*3)
        {
            Console.WriteLine("-1");
        }
        else
        {
            Console.WriteLine("{0} 0",a);
            if(n>=a*4-1)
            {
            f=n-(2*a);
            if(f%2==0)
            {
                Console.WriteLine("{0} 0",a);
                g=f/2+1;
                h=f/2-1;
                Console.WriteLine("{0} {1}",g,h);
            }
            else
            {
                Console.WriteLine("{0} 1",a);
                g=(f-1)/2+1;
                h=(f-1)/2-1;
                Console.WriteLine("{0} {1}",g,h);
            }
            }
            else
            {
                Console.WriteLine("{0} 0",a);
                h=n-3*a;
                Console.WriteLine("{0} {1}",a,h);
            }
        }
    }
}