#include <iostream>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main(int argc, char** argv) {
	int n,a,r,ost;
	cin>>n;
	cin>>a;
	r=a+(a-2);
	if (a*3>n) cout<<"-1"<<endl;
	while (n>=r)
	{
		if ((n/r)>=2)
		{
			cout<<a<<" "<<a-2<<endl;
			n=n-r;
		}
		else
		{	
			if (n%r==0)
			{
				cout<<a<<" "<<a-2<<endl;
				n=0;
			}
			else
			{
				ost=(n%r)/2;
				cout<<a+ost<<" "<<(a-2)+ost<<endl;
				n=0;
			}
		}

	}
	return 0;
}