using System;
class Program {
    static void Main() {
        int n,a,s;
        n = int.Parse(Console.ReadLine());
        a = int.Parse(Console.ReadLine());
        if ((int)(n/a) < 3){
            Console.WriteLine("-1");
        }
        else{
            if (n/a == 3){
                Console.WriteLine("{0}-0",a);
                Console.WriteLine("{0}-0",a);
                Console.WriteLine("{0}-0",a);
            }
            else if (n%3==0&&n%2==0){
                s = n-(a*2);
                Console.WriteLine("{0}-0",a);
                Console.WriteLine("{0}-0",a);
                Console.WriteLine("{0}-{1}",(s/2)+1,(s/2)-1);
            }
            else if( n % 2 == 0){
                s = (n-a-a);
                Console.WriteLine("{0}-0",a);
                Console.WriteLine("{0}-0",a);
                Console.WriteLine("{0}-{1}",(s/2)+1, (s/2)-1);
            }
            else if (n % 2 != 0){
                if ( a % 2 == 0){
                    if (a/2 == 1){
                        Console.WriteLine("-1");
                    }
                    else{
                        s = (n-(a*2))-1;
                        Console.WriteLine("{0}-0",a);
                        Console.WriteLine("{0}-1",a);
                        Console.WriteLine("{0}-{1}",(s/2)+1,(s/2)-1);
                    }
                }
                else  if (a % 2 != 0){
                    s = n-((a*2)+1);
                    Console.WriteLine("{0}-0",a);
                    Console.WriteLine("{0}-1",a);
                    Console.WriteLine("{0}-{1}",(s/2)+1,(s/2)-1);
                }
            }
        }
    }
}