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

namespace Zadatak_2
{
    class Odbojka
    {
        BigInteger x;
        long y;
        long brojSetova;

        public Odbojka()
        {
            string[] input = Console.ReadLine().Split(" ");
            x = Convert.ToInt64(input[0]);
            y = Convert.ToInt64(input[1]);
            brojSetova = (int)(x / (long)y);
            if (brojSetova > 5) brojSetova = 5;
        }
        public bool Provera()
        {
            if (brojSetova < 3)
            {
                Console.WriteLine("-1");
                return false;
            }
            return true;
        }
        public void Set()
        {
            while (brojSetova != 0)
            {
                BigInteger Iskoristiti = new BigInteger();
                Iskoristiti = x - (long)(brojSetova - 1) * y;
                if (Iskoristiti > 2 * (y - 1))
                {
                    Console.WriteLine("{0} {1}", ((brojSetova > 3) ? (Iskoristiti / 2 - 1) : Iskoristiti / 2 + 1),
                        ((brojSetova > 3) ? (Iskoristiti / 2 + 1) : Iskoristiti / 2 - 1));
                    x -= (Iskoristiti / 2 + Iskoristiti / 2);
                }
                else
                {
                    Console.WriteLine("{0} {1}", ((brojSetova > 3) ? (Iskoristiti - y) : y),
                        ((brojSetova > 3) ? (y) : Iskoristiti - y));
                    x -= Iskoristiti;
                }
                brojSetova--;
            }
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Odbojka Nesto = new Odbojka();
            if (Nesto.Provera())
            {
                Nesto.Set();
            }
        }
    }
}