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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] niz = Console.ReadLine().Split();
            int n = int.Parse(niz[0]);
            int a = int.Parse(niz[1]);            
            int bs = n / (a+a-2);            
            if (bs < 3) Console.WriteLine("-1");
            if (bs > 3 || bs==3)
            {
                int x = n - (2 * a - 2) * (bs - 1);
                if (n % 2 == 0)
                {
                    for (int i = 0; i < bs-1; i++)
                    {
                        Console.WriteLine(a + " " + (a - 2));
                    }
                    Console.WriteLine((x / 2 + 1) + " " + (x / 2 - 1));
                }
                if (n % 2 == 1)
                {
                    int suma=a+a-3;
                    for (int i = 0; i < bs-2; i++)
                    {
                        suma+=2*a-2;
                        Console.WriteLine(a + " " + (a - 2));
                    }
                    Console.WriteLine(a + " " + (a - 3));
                    Console.WriteLine(((n - suma) / 2 + 1) + " " + ((n - suma) / 2 - 1));
                }
            }
        }
    }
}