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

namespace ODBOJKA
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] s1 = s.Split(' ');
            int n = int.Parse(s1[0]);
            int a = int.Parse(s1[1]);
            
            if(n<2 || a>Convert.ToInt32(Math.Pow(10,9)) || n<=a || n/a<3)
            {
                Console.WriteLine(-1);
            }
            else
            {
                Console.WriteLine(a + " 0");
                
                if((n-(a*2))%2==1)
                {
                    Console.WriteLine(a + " 1");
                    int x = (n - 2 * a) - 1;
                    x -= 2;
                    int y = x / 2;
                    x = y + 2;
                    Console.WriteLine(x + " " + y);
                }
                else
                {
                    Console.WriteLine(a + " 0");
                    int x = n - 2 * a;
                    x -= 2;
                    int y = x / 2;
                    x = y + 2;
                    Console.WriteLine(x + " " + y);
                }
            }
        }
    }
}