#include <bits/stdc++.h>
using namespace std;
int main() {
  int M, N;
  cin >> N >> M;
  if (M == 3) {
    if (N == 3)
      cout << "0 0\n0 1\n1 0\n";
    else if (N == 4)
      cout << "0 0\n0 1\n1 0\n-1 -1\n";
    else if (N > 4)
      cout << "-1\n";
  } else {
    for (int i = 1; i <= M; i++) cout << i << " " << 1000000 + i * i << endl;
    for (int i = 1; i <= N - M; i++)
      cout << i << " " << -1000000 - 1 * i * i << endl;
  }
  return 0;
}
