#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  while (scanf("%d %d", &n, &m) == 2) {
    if (n == 5 && m == 3 || n == 6 && m == 3) {
      cout << "-1\n";
    } else {
      int c = 1e7;
      for (int i = 0; i < m; i++) cout << i << " " << i * i + c << endl;
      for (int i = 0; i < n - m; i++) cout << i << " " << -i * i - c << endl;
    }
  }
  return 0;
}
