#include <iostream>

using namespace std;
int main(){

int64_t N,A,brojsetova,preostalipoeni,i,f;
cin >> N >> A;

brojsetova=(N-(N%A))/A;
preostalipoeni=N-(brojsetova*A);
i=0;
f=0;

if (N<3*A | N==0 | A==0 | N==A | A>N ){
    cout << "-1";
}
else if (N>A*5){
cout << preostalipoeni/2 << " " << A << endl;
cout << preostalipoeni/2 << " " << A << endl;
while (f<(brojsetova-1)){
    cout << 0 << " " << A << endl;
    f++;
}

}




else {



cout << preostalipoeni << " " << A << endl;
while (i<(brojsetova-1)){
    cout << 0 << " " << A << endl;
    i++;
}
}








return 0;
}