#include <iostream>

using namespace std;
int main(){

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

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

if (N<3*A | N==0 | A==0 | N==A | A>N | N>A*5){
    cout << "-1";
}
else {



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


































return 0;
}