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

namespace Zadatak_2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            double N = Convert.ToInt64(input[0]);
            double A = Convert.ToInt32(input[1]);

            double x = A;
            double y;

            if (N >= (3 * A))
            {

                if (N > (x + x - 2 + 2 * A))
                {
                    while (N > (x + x - 2 + 2 * A))
                    {
                        x = x + 1;
                    }

                    x = x - 1;
                    Console.WriteLine("{0} {1}", x, x - 2);

                    y = N - (x + x - 2 + 2 * A);
                    Console.WriteLine("{0} {1}", A, y);
                    Console.WriteLine("{0} {1}", A, 0);
                }
                if (N == 3 * A)
                {
                    Console.WriteLine("{0} {1}", A, 0);
                    Console.WriteLine("{0} {1}", A, 0);
                    Console.WriteLine("{0} {1}", A, 0);
                }
                if (N <= (x + x - 2 + 2 * A))
                {
                    x = A;
                    y = N - 3 * x - 2;
                    Console.WriteLine("{0} {1}", x, y);

                    y = N - (x + y + 2 * A);
                    Console.WriteLine("{0} {1}", x, y);
                    Console.WriteLine("{0} {1}", x, 0);
                }
            }
            else
            {
                Console.WriteLine("-1");
            }
        }
    }
}