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