#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n >> m;
  int x = 0;
  int y = 0;
  if ((m == 3) && ((n == 5) || (n == 6))) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 0; i < n - m; i++) {
    cout << x + i << " " << -1 * (x + i) * (x + i) - 1000000 << endl;
  }
  for (int i = 0; i < m; i++) {
    cout << x + i << " " << 1 * (x + i) * (x + i) + 1000000 << endl;
  }
  return 0;
}
